Update to LLVM 16.0.0
Resolves: rhbz#2178800
This commit is contained in:
parent
3396027cd5
commit
e534489b28
4
.gitignore
vendored
4
.gitignore
vendored
@ -2,3 +2,7 @@ SOURCES/compiler-rt-15.0.7.src.tar.xz
|
|||||||
SOURCES/release-keys.asc
|
SOURCES/release-keys.asc
|
||||||
/compiler-rt-15.0.7.src.tar.xz
|
/compiler-rt-15.0.7.src.tar.xz
|
||||||
/release-keys.asc
|
/release-keys.asc
|
||||||
|
/compiler-rt-16.0.0.src.tar.xz
|
||||||
|
/compiler-rt-16.0.0.src.tar.xz.sig
|
||||||
|
/cmake-16.0.0.src.tar.xz
|
||||||
|
/cmake-16.0.0.src.tar.xz.sig
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
%global compiler_rt_version 15.0.7
|
%global maj_ver 16
|
||||||
#global rc_ver 2
|
%global min_ver 0
|
||||||
|
%global patch_ver 0
|
||||||
|
#global rc_ver 4
|
||||||
|
%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 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
|
||||||
|
|
||||||
# see https://sourceware.org/bugzilla/show_bug.cgi?id=25271
|
# see https://sourceware.org/bugzilla/show_bug.cgi?id=25271
|
||||||
%global optflags %(echo %{optflags} -D_DEFAULT_SOURCE)
|
%global optflags %(echo %{optflags} -D_DEFAULT_SOURCE)
|
||||||
@ -18,8 +22,8 @@ URL: http://llvm.org
|
|||||||
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compiler_rt_version}%{?rc_ver:-rc%{rc_ver}}/%{crt_srcdir}.tar.xz
|
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
|
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
|
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
|
||||||
Patch0: add-llvm-cmake-package.patch
|
Source4: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compiler_rt_version}%{?rc_ver:-rc%{rc_ver}}/%{cmake_srcdir}.tar.xz.sig
|
||||||
|
|
||||||
# RHEL-specific patches
|
# RHEL-specific patches
|
||||||
Patch100: 0001-Drop-fno-stack-protector-from-the-compiler-flags.patch
|
Patch100: 0001-Drop-fno-stack-protector-from-the-compiler-flags.patch
|
||||||
@ -47,17 +51,27 @@ instrumentation, and Blocks C language extension.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
|
%{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
|
%autosetup -n %{crt_srcdir} -p2
|
||||||
|
|
||||||
%py3_shebang_fix lib/hwasan/scripts/hwasan_symbolize
|
%py3_shebang_fix lib/hwasan/scripts/hwasan_symbolize
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
# Copy CFLAGS into ASMFLAGS, so -fcf-protection is used when compiling assembly files.
|
||||||
|
export ASMFLAGS=$CFLAGS
|
||||||
mkdir -p %{_vpath_builddir}
|
mkdir -p %{_vpath_builddir}
|
||||||
cd %{_vpath_builddir}
|
cd %{_vpath_builddir}
|
||||||
|
|
||||||
%cmake .. -GNinja \
|
%cmake .. -GNinja \
|
||||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||||
-DLLVM_CONFIG_PATH:FILEPATH=%{_bindir}/llvm-config-%{__isa_bits} \
|
-DCMAKE_MODULE_PATH=%{_libdir}/cmake/llvm \
|
||||||
|
-DCMAKE_SKIP_RPATH:BOOL=ON \
|
||||||
\
|
\
|
||||||
%if 0%{?__isa_bits} == 64
|
%if 0%{?__isa_bits} == 64
|
||||||
-DLLVM_LIBDIR_SUFFIX=64 \
|
-DLLVM_LIBDIR_SUFFIX=64 \
|
||||||
@ -74,15 +88,15 @@ cd %{_vpath_builddir}
|
|||||||
%cmake_install
|
%cmake_install
|
||||||
|
|
||||||
# move blacklist/abilist files to where clang expect them
|
# move blacklist/abilist files to where clang expect them
|
||||||
mkdir -p %{buildroot}%{_libdir}/clang/%{compiler_rt_version}/share
|
mkdir -p %{buildroot}%{_libdir}/clang/%{maj_ver}/share
|
||||||
mv -v %{buildroot}%{_datadir}/*list.txt %{buildroot}%{_libdir}/clang/%{compiler_rt_version}/share/
|
mv -v %{buildroot}%{_datadir}/*list.txt %{buildroot}%{_libdir}/clang/%{maj_ver}/share/
|
||||||
|
|
||||||
# move sanitizer libs to better place
|
# move sanitizer libs to better place
|
||||||
%global libclang_rt_installdir lib/linux
|
%global libclang_rt_installdir lib/linux
|
||||||
mkdir -p %{buildroot}%{_libdir}/clang/%{compiler_rt_version}/lib
|
mkdir -p %{buildroot}%{_libdir}/clang/%{maj_ver}/lib
|
||||||
mv -v %{buildroot}%{_prefix}/%{libclang_rt_installdir}/*clang_rt* %{buildroot}%{_libdir}/clang/%{compiler_rt_version}/lib
|
mv -v %{buildroot}%{_prefix}/%{libclang_rt_installdir}/*_rt* %{buildroot}%{_libdir}/clang/%{maj_ver}/lib
|
||||||
mkdir -p %{buildroot}%{_libdir}/clang/%{compiler_rt_version}/lib/linux/
|
mkdir -p %{buildroot}%{_libdir}/clang/%{maj_ver}/lib/linux/
|
||||||
pushd %{buildroot}%{_libdir}/clang/%{compiler_rt_version}/lib
|
pushd %{buildroot}%{_libdir}/clang/%{maj_ver}/lib
|
||||||
for i in *.a *.so
|
for i in *.a *.so
|
||||||
do
|
do
|
||||||
ln -s ../$i linux/$i
|
ln -s ../$i linux/$i
|
||||||
@ -92,11 +106,11 @@ done
|
|||||||
# the symlinks will be dangling if the 32 bits version is not installed, but that should be fine
|
# the symlinks will be dangling if the 32 bits version is not installed, but that should be fine
|
||||||
%ifarch x86_64
|
%ifarch x86_64
|
||||||
|
|
||||||
mkdir -p %{buildroot}/%{_exec_prefix}/lib/clang/%{compiler_rt_version}/lib/linux
|
mkdir -p %{buildroot}/%{_exec_prefix}/lib/clang/%{maj_ver}/lib/linux
|
||||||
for i in *.a *.so
|
for i in *.a *.so
|
||||||
do
|
do
|
||||||
target=`echo "$i" | sed -e 's/x86_64/i386/'`
|
target=`echo "$i" | sed -e 's/x86_64/i386/'`
|
||||||
ln -s ../../../../../lib/clang/%{compiler_rt_version}/lib/$target ../../../../%{_lib}/clang/%{compiler_rt_version}/lib/linux/
|
ln -s ../../../../../lib/clang/%{maj_ver}/lib/$target ../../../../%{_lib}/clang/%{maj_ver}/lib/linux/
|
||||||
done
|
done
|
||||||
|
|
||||||
%endif
|
%endif
|
||||||
@ -110,13 +124,16 @@ popd
|
|||||||
%files
|
%files
|
||||||
%license LICENSE.TXT
|
%license LICENSE.TXT
|
||||||
%{_includedir}/*
|
%{_includedir}/*
|
||||||
%{_libdir}/clang/%{compiler_rt_version}/lib/*
|
%{_libdir}/clang/%{maj_ver}/lib/*
|
||||||
%{_libdir}/clang/%{compiler_rt_version}/share/*
|
%{_libdir}/clang/%{maj_ver}/share/*
|
||||||
%ifarch x86_64 aarch64
|
%ifarch x86_64 aarch64
|
||||||
%{_bindir}/hwasan_symbolize
|
%{_bindir}/hwasan_symbolize
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Apr 13 2023 Tom Stellard <tstellar@redhat.com> - 16.0.0-1
|
||||||
|
- Update to LLVM 16.0.0
|
||||||
|
|
||||||
* Thu Jan 19 2023 Tom Stellard <tstellar@redhat.com> - 15.0.7-1
|
* Thu Jan 19 2023 Tom Stellard <tstellar@redhat.com> - 15.0.7-1
|
||||||
- Update to LLVM 15.0.7
|
- Update to LLVM 15.0.7
|
||||||
|
|
||||||
|
6
sources
6
sources
@ -1,2 +1,4 @@
|
|||||||
SHA512 (compiler-rt-15.0.7.src.tar.xz) = 893aff1a7a3d382449b69ddfda10fbf0311f146266749e99683c3907fb5b9b34b63454625b066d4881a1d06b520bb066ea33f9be1ca6407d31044ef8e26e70f0
|
SHA512 (compiler-rt-16.0.0.src.tar.xz) = 6906964f0aa12bb18b137bee68a562412abf6d0200f8cfece83dc860ad06de41de847d04809fba08d9e2bb61f27e036eadb51fce153e05181f0bd4fecf29727d
|
||||||
SHA512 (release-keys.asc) = 08eab15cd40116bb1eea5ddcdd2822d248d6d7f5dce37868aa7152377aa0062567fe571909a1c9d3c3f8978ebcf5e0f6b0ab8fff13e3578c0548e21be3026462
|
SHA512 (compiler-rt-16.0.0.src.tar.xz.sig) = 8c6de41ed7bed40930fa60f2549ba1267d0b6ef6ed05f3febd879066b9bf8a812a7faccbd3bb791c5780a91f13decc3be0cb5e4cbe7d6281e5e96a4e21593119
|
||||||
|
SHA512 (cmake-16.0.0.src.tar.xz) = 4f21461aa8165061dbea47dcda4f098957e16bd307484bcb66884cf5a0776197f69a74002d5601229c4630db53ac44049f3f2ce1e96a6bb16ba3df828d387932
|
||||||
|
SHA512 (cmake-16.0.0.src.tar.xz.sig) = c8e22d62b73ed56e66af6e7ce7a8f41de7cc16cd1243ebb602a3e5077141c03d64ca75295ca08b0051c887f59c7a53b871f7a45ead3275e11310f574a50856aa
|
||||||
|
Loading…
Reference in New Issue
Block a user