Update to 17.0.1

Resolves: RHEL-9283
This commit is contained in:
Timm Bäder 2023-10-04 12:46:46 +02:00
parent e6d638ab46
commit 5290bc3d9c
3 changed files with 61 additions and 59 deletions

View File

@ -14,23 +14,23 @@ diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/
index 2fc70522895f..e83a1ecea50b 100644 index 2fc70522895f..e83a1ecea50b 100644
--- a/compiler-rt/lib/builtins/CMakeLists.txt --- a/compiler-rt/lib/builtins/CMakeLists.txt
+++ b/compiler-rt/lib/builtins/CMakeLists.txt +++ b/compiler-rt/lib/builtins/CMakeLists.txt
@@ -12,7 +12,6 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) @@ -5,7 +5,6 @@
"at least 3.20.0 now to avoid issues in the future!") if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
endif() cmake_minimum_required(VERSION 3.20.0)
- set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) - set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
project(CompilerRTBuiltins C ASM) project(CompilerRTBuiltins C ASM)
set(COMPILER_RT_STANDALONE_BUILD TRUE) set(COMPILER_RT_STANDALONE_BUILD TRUE)
set(COMPILER_RT_BUILTINS_STANDALONE_BUILD TRUE) set(COMPILER_RT_BUILTINS_STANDALONE_BUILD TRUE)
@@ -56,6 +55,8 @@ if (COMPILER_RT_STANDALONE_BUILD) @@ -50,6 +49,8 @@ if (COMPILER_RT_STANDALONE_BUILD)
"Turns on or off -fPIC for the builtin library source"
ON) ON)
endif() endif()
+
+set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
+set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
+
include(builtin-config-ix) include(builtin-config-ix)
include(CMakeDependentOption)
include(CMakePushCheckState) include(CMakePushCheckState)
-- --
2.40.1 2.41.0

View File

@ -1,12 +1,26 @@
%bcond_with snapshot_build
%if %{with snapshot_build}
# Unlock LLVM Snapshot LUA functions
%{llvm_sb_verbose}
%{llvm_sb}
%endif
%global toolchain clang %global toolchain clang
%global maj_ver 16 %global maj_ver 17
%global min_ver 0 %global min_ver 0
%global patch_ver 6 %global patch_ver 1
#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 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)
@ -15,17 +29,20 @@
%global optflags %(echo %{optflags} -Dasm=__asm__) %global optflags %(echo %{optflags} -Dasm=__asm__)
Name: compiler-rt Name: compiler-rt
Version: %{compiler_rt_version} Version: %{compiler_rt_version}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}}
Release: 2%{?dist} Release: 1%{?dist}
Summary: LLVM "compiler-rt" runtime libraries Summary: LLVM "compiler-rt" runtime libraries
License: Apache-2.0 WITH LLVM-exception OR NCSA OR MIT License: Apache-2.0 WITH LLVM-exception OR NCSA OR MIT
URL: http://llvm.org 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 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 %endif
Source4: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compiler_rt_version}%{?rc_ver:-rc%{rc_ver}}/%{cmake_srcdir}.tar.xz.sig
Patch0: 0001-compiler-rt-Fix-FLOAT16-feature-detection.patch Patch0: 0001-compiler-rt-Fix-FLOAT16-feature-detection.patch
@ -36,6 +53,8 @@ BuildRequires: python3
# We need python3-devel for %%py3_shebang_fix # We need python3-devel for %%py3_shebang_fix
BuildRequires: python3-devel BuildRequires: python3-devel
BuildRequires: llvm-devel = %{version} BuildRequires: llvm-devel = %{version}
BuildRequires: llvm-cmake-utils = %{version}
BuildRequires: zlib-devel
# For gpg source verification # For gpg source verification
BuildRequires: gnupg2 BuildRequires: gnupg2
@ -50,14 +69,11 @@ 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
# compiler-rt does not allow configuring LLVM_COMMON_CMAKE_UTILS.
ln -s %{_datadir}/llvm/cmake ../cmake
%py3_shebang_fix lib/hwasan/scripts/hwasan_symbolize %py3_shebang_fix lib/hwasan/scripts/hwasan_symbolize
%build %build
@ -68,6 +84,12 @@ export ASMFLAGS=$CFLAGS
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_MODULE_PATH=%{_libdir}/cmake/llvm \ -DCMAKE_MODULE_PATH=%{_libdir}/cmake/llvm \
-DCMAKE_SKIP_RPATH:BOOL=ON \ -DCMAKE_SKIP_RPATH:BOOL=ON \
-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 %if 0%{?__isa_bits} == 64
-DLLVM_LIBDIR_SUFFIX=64 \ -DLLVM_LIBDIR_SUFFIX=64 \
@ -81,51 +103,33 @@ export ASMFLAGS=$CFLAGS
%install %install
%cmake_install %cmake_install
%ifarch ppc64le
# move blacklist/abilist files to where clang expect them # Fix install path on ppc64le so that the directory name matches the triple used
mkdir -p %{buildroot}%{_libdir}/clang/%{maj_ver}/share # by clang.
mv -v %{buildroot}%{_datadir}/*list.txt %{buildroot}%{_libdir}/clang/%{maj_ver}/share/ mv %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/lib/powerpc64le-redhat-linux-gnu %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/lib/ppc64le-redhat-linux-gnu
# 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
%endif %endif
popd
%check %check
#%%cmake_build --target check-compiler-rt #%%cmake_build --target check-compiler-rt
%files %files
%license LICENSE.TXT %license LICENSE.TXT
%{_includedir}/*
%{_libdir}/clang/%{maj_ver}/lib/*
%{_libdir}/clang/%{maj_ver}/share/*
%ifarch x86_64 aarch64 %ifarch x86_64 aarch64
%{_bindir}/hwasan_symbolize %{_prefix}/lib/clang/%{maj_ver}/bin/*
%endif %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 %changelog
%{?llvm_snapshot_changelog_entry}
* Wed Oct 04 2023 Timm Bäder <tbaeder@redhat.com> - 17.0.1-1
- Update to 17.0.1
* Tue Aug 29 2023 Tom Stellard <tstellar@redhat.com> - 16.0.6-2 * Tue Aug 29 2023 Tom Stellard <tstellar@redhat.com> - 16.0.6-2
- Fix FLOAT16 detection - Fix FLOAT16 detection

View File

@ -1,4 +1,2 @@
SHA512 (compiler-rt-16.0.6.src.tar.xz) = 852e2105facb12ea0943aa24e0c220f76671ad76dfe7d07b8164c3a1d8360670ca565a2b6dd590722b974e16a2adf3c466fdabdfd3bb3ebbd005162c8ac4406c SHA512 (compiler-rt-17.0.1.src.tar.xz.sig) = 5f8922e2e660e7b91c9a089caba51e8132c59f8502d39a70889b6508811dbbeece734a06b97ea366e87c023b957d09d6a62a06f7d848539bc894f6841084d61c
SHA512 (compiler-rt-16.0.6.src.tar.xz.sig) = 3c86a39829c02c61258874a8729b50a4b562716fcf901a69fe4bf6316b91c0f56596a20b98e74881b729773a34c3b4d4fa01cbc2ada81ed452a3cc2ad7ea3bbb SHA512 (compiler-rt-17.0.1.src.tar.xz) = a440cca467e51cd7e3484adb8ea189ca1af61f9da928b17fed7ee48ebf3e997a55b4b5e0a8309c02a59b59be6ea8458745e9e898c403cfff83b93ff57fbf922d
SHA512 (cmake-16.0.6.src.tar.xz) = 52ecd941d2d85a5b668caa5d0d40480cb6a97b3bf1174e634c2a93e9ef6d03670ca7e96abb0a60cb33ba537b93d5788754dab1f2f45c1f623f788162717d088b
SHA512 (cmake-16.0.6.src.tar.xz.sig) = d20c5e51315aa476775e6ce886684b9f882ce283fc40aa6c1b8f03964c77a1e745e2e1fb00b3488dddfe1a04378e2bfd090350de28e58088525a5305ecb1bea6