| 
						 
							
							
							
						 
					 | 
				
			
			 | 
			 | 
			
				@ -1,10 +1,36 @@
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%global maj_ver 16
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%global min_ver 0
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%global patch_ver 6
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%bcond_with snapshot_build
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%if %{with snapshot_build}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				# Unlock LLVM Snapshot LUA functions
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%{llvm_sb_verbose}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%{llvm_sb}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%endif
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				# Opt out of https://fedoraproject.org/wiki/Changes/fno-omit-frame-pointer
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				# https://bugzilla.redhat.com/show_bug.cgi?id=2158587
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%undefine _include_frame_pointers
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%bcond_with compat_build
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%global maj_ver 18
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%global min_ver 1
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%global patch_ver 8
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				#global rc_ver 4
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%if %{with snapshot_build}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%global maj_ver %{llvm_snapshot_version_major}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%global min_ver %{llvm_snapshot_version_minor}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%global patch_ver %{llvm_snapshot_version_patch}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%undefine rc_ver
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%endif
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%global compiler_rt_version %{maj_ver}.%{min_ver}.%{patch_ver}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%global crt_srcdir compiler-rt-%{compiler_rt_version}%{?rc_ver:rc%{rc_ver}}.src
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%global cmake_srcdir cmake-%{compiler_rt_version}%{?rc_ver:rc%{rc_ver}}.src
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%if %{with compat_build}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%global pkg_name compiler-rt%{maj_ver}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%else
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%global pkg_name compiler-rt
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%endif
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				# see https://sourceware.org/bugzilla/show_bug.cgi?id=25271
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%global optflags %(echo %{optflags} -D_DEFAULT_SOURCE)
 | 
			
		
		
	
	
		
			
				
					
					| 
						
					 | 
				
			
			 | 
			 | 
			
				@ -12,39 +38,42 @@
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				# see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93615
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%global optflags %(echo %{optflags} -Dasm=__asm__)
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				Name:		compiler-rt
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				Version:	%{compiler_rt_version}%{?rc_ver:~rc%{rc_ver}}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				Release:	3%{?dist}.alma.1
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				Name:		%{pkg_name}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				Version:	%{compiler_rt_version}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				Release:	1%{?dist}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				Summary:	LLVM "compiler-rt" runtime libraries
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				License:	NCSA or MIT
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				URL:		http://llvm.org
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%if %{with snapshot_build}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				Source0:    %{llvm_snapshot_source_prefix}compiler-rt-%{llvm_snapshot_yyyymmdd}.src.tar.xz
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%{llvm_snapshot_extra_source_tags}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%else
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				Source0:	https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compiler_rt_version}%{?rc_ver:-rc%{rc_ver}}/%{crt_srcdir}.tar.xz
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				Source1:	https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compiler_rt_version}%{?rc_ver:-rc%{rc_ver}}/%{crt_srcdir}.tar.xz.sig
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				Source2:	release-keys.asc
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				Source3:	https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compiler_rt_version}%{?rc_ver:-rc%{rc_ver}}/%{cmake_srcdir}.tar.xz
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				Source4:	https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compiler_rt_version}%{?rc_ver:-rc%{rc_ver}}/%{cmake_srcdir}.tar.xz.sig
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%endif
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				Patch0:		0001-compiler-rt-Fix-FLOAT16-feature-detection.patch
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				# RHEL-specific patches
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				Patch100:	0001-Drop-fno-stack-protector-from-the-compiler-flags.patch
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				Patch101:	fix-page-size-constant.patch
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				# Patches were taken from:
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				# https://gitlab.com/redhat/centos-stream/rpms/compiler-rt/-/commit/e6d638ab46fce7cdd203bf1805fb80d11bbf8a62
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				Patch102:	0001-compiler-rt-Fix-FLOAT16-feature-detection.patch
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				Patch101:	0001-Fix-page-size-constant-on-aarch64-and-ppc64le.patch	
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				BuildRequires:	clang
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				BuildRequires:	cmake
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				BuildRequires:	ninja-build
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				BuildRequires:	python3
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				# We need python3-devel for pathfix.py.
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				# We need python3-devel for %%py3_shebang_fix
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				BuildRequires:	python3-devel
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				BuildRequires:	llvm-devel = %{version}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				BuildRequires:	llvm-cmake-utils = %{version}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				# For gpg source verification
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				BuildRequires:	gnupg2
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				Requires: clang-resource-filesystem%{?isa} = %{version}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				Provides: %{name}(major) = %{maj_ver}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%description
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				The compiler-rt project is a part of the LLVM project. It provides
 | 
			
		
		
	
	
		
			
				
					
					| 
						
					 | 
				
			
			 | 
			 | 
			
				@ -54,29 +83,33 @@ instrumentation, and Blocks C language extension.
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%prep
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE4}' --data='%{SOURCE3}'
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%setup -T -q -b 3 -n %{cmake_srcdir}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				# TODO: It would be more elegant to set -DLLVM_COMMON_CMAKE_UTILS=%{_builddir}/%{cmake_srcdir},
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				# but this is not a CACHED variable, so we can't actually set it externally :(
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				cd ..
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				mv %{cmake_srcdir} cmake
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%autosetup -n %{crt_srcdir} -p2
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				# compiler-rt does not allow configuring LLVM_COMMON_CMAKE_UTILS.
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				ln -s %{_datadir}/llvm/cmake ../cmake
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%py3_shebang_fix lib/hwasan/scripts/hwasan_symbolize
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%build
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				# Copy CFLAGS into ASMFLAGS, so -fcf-protection is used when compiling assembly files.
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				export ASMFLAGS=$CFLAGS
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				mkdir -p %{_vpath_builddir}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				cd %{_vpath_builddir}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%undefine __cmake_in_source_build
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%cmake .. -GNinja \
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				# Copy CFLAGS into ASMFLAGS, so -fcf-protection is used when compiling assembly files.
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				export ASMFLAGS="%{build_cflags}"
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				# RHEL 8 specific: "global toolchain clang" is not supported on RHEL 8, so explicitly enable
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				# clang in cmake. This is necessary to get the correct float16 ABI.
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%cmake	-GNinja \
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					-DCMAKE_BUILD_TYPE=RelWithDebInfo \
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					-DCMAKE_MODULE_PATH=%{_libdir}/cmake/llvm \
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					-DCMAKE_SKIP_RPATH:BOOL=ON \
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					-DCMAKE_C_COMPILER=clang \
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					-DCMAKE_CXX_COMPILER=clang++ \
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					-DCOMPILER_RT_INSTALL_PATH=%{_prefix}/lib/clang/%{maj_ver} \
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON \
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					\
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%if %{with snapshot_build}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					-DLLVM_VERSION_SUFFIX="%{llvm_snapshot_version_suffix}" \
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%endif
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					\
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%if 0%{?__isa_bits} == 64
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					-DLLVM_LIBDIR_SUFFIX=64 \
 | 
			
		
		
	
	
		
			
				
					
					| 
						
					 | 
				
			
			 | 
			 | 
			
				@ -84,60 +117,75 @@ cd %{_vpath_builddir}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					-DLLVM_LIBDIR_SUFFIX= \
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%endif
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					-DCOMPILER_RT_INCLUDE_TESTS:BOOL=OFF # could be on?
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%cmake_build
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%install
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				cd %{_vpath_builddir}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%cmake_install
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				# move blacklist/abilist files to where clang expect them
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				mkdir -p %{buildroot}%{_libdir}/clang/%{maj_ver}/share
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				mv -v %{buildroot}%{_datadir}/*list.txt  %{buildroot}%{_libdir}/clang/%{maj_ver}/share/
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				# move sanitizer libs to better place
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%global libclang_rt_installdir lib/linux
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				mkdir -p %{buildroot}%{_libdir}/clang/%{maj_ver}/lib
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				mv -v %{buildroot}%{_prefix}/%{libclang_rt_installdir}/*_rt* %{buildroot}%{_libdir}/clang/%{maj_ver}/lib
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				mkdir -p %{buildroot}%{_libdir}/clang/%{maj_ver}/lib/linux/
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				pushd %{buildroot}%{_libdir}/clang/%{maj_ver}/lib
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				for i in *.a *.so
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				do
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					ln -s ../$i linux/$i
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				done
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				# multilib support: also create symlink from lib to lib64, fixes rhbz#1678240
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				# the symlinks will be dangling if the 32 bits version is not installed, but that should be fine
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%ifarch x86_64
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				mkdir -p %{buildroot}/%{_exec_prefix}/lib/clang/%{maj_ver}/lib/linux
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				for i in *.a *.so
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				do
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					target=`echo "$i" | sed -e 's/x86_64/i386/'`
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
					ln -s ../../../../../lib/clang/%{maj_ver}/lib/$target ../../../../%{_lib}/clang/%{maj_ver}/lib/linux/
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				done
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%ifarch ppc64le
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				# Fix install path on ppc64le so that the directory name matches the triple used
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				# by clang.
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				mv %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/lib/powerpc64le-redhat-linux-gnu %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/lib/ppc64le-redhat-linux-gnu
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%endif
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%ifarch %{ix86}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				# Fix install path on ix86 so that the directory name matches the triple used
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				# by clang on both actual ix86 and on x86_64 with -m32:
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%if "%{_target_cpu}" != "i386"
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				ln -s i386-redhat-linux-gnu %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/lib/%{_target_cpu}-redhat-linux-gnu
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%endif
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%endif
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				popd
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%check
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				#%%cmake_build --target check-compiler-rt
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%files
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%license LICENSE.TXT
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%{_includedir}/*
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%{_libdir}/clang/%{maj_ver}/lib/*
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%{_libdir}/clang/%{maj_ver}/share/*
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%ifarch x86_64 aarch64
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%{_bindir}/hwasan_symbolize
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%{_prefix}/lib/clang/%{maj_ver}/bin/*
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%endif
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%{_prefix}/lib/clang/%{maj_ver}/include/*
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%{_prefix}/lib/clang/%{maj_ver}/lib/*
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%{_prefix}/lib/clang/%{maj_ver}/share/*
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				#%ifarch x86_64 aarch64
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				#{_bindir}/hwasan_symbolize
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				#%endif
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%changelog
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				* Mon Jan 15 2024 Eduard Abdullin <eabdullin@almalinux.org> - 16.0.6-3.alma.1
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				- Rebuild with clang
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				- compiler-rt: Fix FLOAT16 feature detection
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				* Tue Jul 09 2024 Tom Stellard <tstellar@redhat.com> - 18.1.8-1
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				- 18.1.8 Release
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				* Fri Mar 22 2024 Tom Stellard <tstellar@redhat.com> - 18.1.2-1
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				- 18.1.2 Release
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				* Tue Mar 12 2024 Tom Stellard <tstellar@redhat.com> - 18.1.1-1
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				- 18.1.1 Release
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				* Wed Feb 28 2024 Tom Stellard <tstellar@redhat.com> - 18.1.0~rc4-1
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				- 18.1.0-rc4 Release
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 17.0.6-5
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 17.0.6-4
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				%{?llvm_snapshot_changelog_entry}
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				* Mon Dec 18 2023 Jeremy Newton <alexjnewt at hotmail dot com> - 17.0.6-3
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				- Add compiler-rt(major) provides
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				* Wed Dec 13 2023 Miro Hrončok <mhroncok@redhat.com> - 17.0.6-2
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				- Fix install path on i686
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				* Wed Nov 29 2023 Nikita Popov <npopov@redhat.com> - 17.0.6-1
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				- Update to LLVM 17.0.6
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				* Fri Oct 13 2023 Nikita Popov <npopov@redhat.com> - 17.0.2-2
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				- Build with clang
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				* Wed Oct 04 2023 Nikita Popov <npopov@redhat.com> - 17.0.2-1
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				- Update to LLVM 17.0.2
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				* Fri Jun 23 2023 Tom Stellard <tstellar@redhat.com> - 16.0.6-1
 | 
			
		
		
	
		
			
				 | 
				 | 
			
			 | 
			 | 
			
				- 16.0.6 Release
 | 
			
		
		
	
	
		
			
				
					
					| 
						
					 | 
				
			
			 | 
			 | 
			
				
 
 |