From 9a42b99dbc3b1dfb0cf1e3b8abae726e454bfce6 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 05 2021 18:25:42 +0000 Subject: import compiler-rt-12.0.1-1.module+el8.5.0+11871+08d0eab5 --- diff --git a/.compiler-rt.metadata b/.compiler-rt.metadata index 2d5b128..d2a6fc5 100644 --- a/.compiler-rt.metadata +++ b/.compiler-rt.metadata @@ -1,2 +1,2 @@ -be3e79fb93cd99135643a191f27c49449bf9c0ee SOURCES/compiler-rt-11.0.0.src.tar.xz -32fa4b0193960f05064f2ab31b5a89c7cf48a0b9 SOURCES/hans-gpg-key.asc +d33af648dc9b901c6c9f6c5872af2f59203f1a25 SOURCES/compiler-rt-12.0.1.src.tar.xz +b8d2648a01d36ed0186fd2c5af325fd28797f9a0 SOURCES/tstellar-gpg-key.asc diff --git a/.gitignore b/.gitignore index df8205a..b91f9de 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -SOURCES/compiler-rt-11.0.0.src.tar.xz -SOURCES/hans-gpg-key.asc +SOURCES/compiler-rt-12.0.1.src.tar.xz +SOURCES/tstellar-gpg-key.asc diff --git a/SOURCES/0001-PATCH-compiler-rt-Workaround-libstdc-limitation-wrt..patch b/SOURCES/0001-PATCH-compiler-rt-Workaround-libstdc-limitation-wrt..patch new file mode 100644 index 0000000..f734b5f --- /dev/null +++ b/SOURCES/0001-PATCH-compiler-rt-Workaround-libstdc-limitation-wrt..patch @@ -0,0 +1,43 @@ +From 8247295860b69fd379e282c3e6315df9f700e4d8 Mon Sep 17 00:00:00 2001 +From: serge-sans-paille +Date: Thu, 25 Feb 2021 14:12:57 +0100 +Subject: [PATCH][compiler-rt] Workaround libstdc++ limitation wrt. thread copy + +--- + compiler-rt/lib/fuzzer/FuzzerDefs.h | 6 ++++++ + compiler-rt/lib/fuzzer/FuzzerDriver.cpp | 2 +- + 2 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/compiler-rt/lib/fuzzer/FuzzerDefs.h b/compiler-rt/lib/fuzzer/FuzzerDefs.h +index 1a2752a..abfbb8d 100644 +--- a/compiler-rt/lib/fuzzer/FuzzerDefs.h ++++ b/compiler-rt/lib/fuzzer/FuzzerDefs.h +@@ -50,6 +50,12 @@ template + + template + struct rebind { typedef fuzzer_allocator other; }; ++ ++ template< class U, class... Args > ++ void construct( U* p, Args&&... args ) { ++ std::allocator::construct(p, std::forward(args)...); ++ } ++ + }; + + template +diff --git a/compiler-rt/lib/fuzzer/FuzzerDriver.cpp b/compiler-rt/lib/fuzzer/FuzzerDriver.cpp +index 447cafc..2fce139 100644 +--- a/compiler-rt/lib/fuzzer/FuzzerDriver.cpp ++++ b/compiler-rt/lib/fuzzer/FuzzerDriver.cpp +@@ -294,7 +294,7 @@ static int RunInMultipleProcesses(const Vector &Args, + std::thread Pulse(PulseThread); + Pulse.detach(); + for (unsigned i = 0; i < NumWorkers; i++) +- V.push_back(std::thread(WorkerThread, std::ref(Cmd), &Counter, NumJobs, &HasErrors)); ++ V.emplace_back(WorkerThread, std::ref(Cmd), &Counter, NumJobs, &HasErrors); + for (auto &T : V) + T.join(); + return HasErrors ? 1 : 0; +-- +1.8.3.1 + diff --git a/SOURCES/0001-PATCH-std-thread-copy.patch b/SOURCES/0001-PATCH-std-thread-copy.patch deleted file mode 100644 index 53d297d..0000000 --- a/SOURCES/0001-PATCH-std-thread-copy.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -ru compiler-rt-8.0.0rc1.src.orig/lib/fuzzer/FuzzerDefs.h compiler-rt-8.0.0rc1.src/lib/fuzzer/FuzzerDefs.h ---- compiler-rt-8.0.0rc1.src.orig/lib/fuzzer/FuzzerDefs.h 2019-01-09 21:46:09.000000000 +0000 -+++ compiler-rt-8.0.0rc1.src/lib/fuzzer/FuzzerDefs.h 2019-02-12 14:03:32.971147814 +0000 -@@ -176,6 +176,12 @@ - - template - struct rebind { typedef fuzzer_allocator other; }; -+ -+ template< class U, class... Args > -+ void construct( U* p, Args&&... args ) { -+ std::allocator::construct(p, std::forward(args)...); -+ } -+ - }; - - template -diff -ru compiler-rt-8.0.0rc1.src.orig/lib/fuzzer/FuzzerDriver.cpp compiler-rt-8.0.0rc1.src/lib/fuzzer/FuzzerDriver.cpp ---- compiler-rt-8.0.0rc1.src.orig/lib/fuzzer/FuzzerDriver.cpp 2019-01-15 22:12:51.000000000 +0000 -+++ compiler-rt-8.0.0rc1.src/lib/fuzzer/FuzzerDriver.cpp 2019-02-12 13:05:15.965113872 +0000 -@@ -252,7 +252,7 @@ - std::thread Pulse(PulseThread); - Pulse.detach(); - for (unsigned i = 0; i < NumWorkers; i++) -- V.push_back(std::thread(WorkerThread, std::ref(Cmd), &Counter, NumJobs, &HasErrors)); -+ V.emplace_back(WorkerThread, std::ref(Cmd), &Counter, NumJobs, &HasErrors); - for (auto &T : V) - T.join(); - return HasErrors ? 1 : 0; diff --git a/SOURCES/compiler-rt-11.0.0.src.tar.xz.sig b/SOURCES/compiler-rt-11.0.0.src.tar.xz.sig deleted file mode 100644 index 9889fc6..0000000 Binary files a/SOURCES/compiler-rt-11.0.0.src.tar.xz.sig and /dev/null differ diff --git a/SOURCES/compiler-rt-12.0.1.src.tar.xz.sig b/SOURCES/compiler-rt-12.0.1.src.tar.xz.sig new file mode 100644 index 0000000..c41c624 Binary files /dev/null and b/SOURCES/compiler-rt-12.0.1.src.tar.xz.sig differ diff --git a/SPECS/compiler-rt.spec b/SPECS/compiler-rt.spec index 0d36a83..cdd58b7 100644 --- a/SPECS/compiler-rt.spec +++ b/SPECS/compiler-rt.spec @@ -1,6 +1,4 @@ - -#%%global rc_ver 6 -%global baserelease 1 +#%%global rc_ver 5 %global crt_srcdir compiler-rt-%{version}%{?rc_ver:rc%{rc_ver}}.src @@ -11,17 +9,17 @@ %global optflags %(echo %{optflags} -Dasm=__asm__) Name: compiler-rt -Version: 11.0.0 -Release: %{baserelease}%{?rc_ver:.rc%{rc_ver}}%{?dist} +Version: 12.0.1%{?rc_ver:~rc%{rc_ver}} +Release: 1%{?dist} Summary: LLVM "compiler-rt" runtime libraries License: NCSA or MIT URL: http://llvm.org Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}%{?rc_ver:-rc%{rc_ver}}/%{crt_srcdir}.tar.xz Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}%{?rc_ver:-rc%{rc_ver}}/%{crt_srcdir}.tar.xz.sig -Source2: https://prereleases.llvm.org/%{version}/hans-gpg-key.asc +Source2: tstellar-gpg-key.asc -Patch0: 0001-PATCH-std-thread-copy.patch +Patch0: 0001-PATCH-compiler-rt-Workaround-libstdc-limitation-wrt..patch # RHEL-specific patches Patch100: 0001-Drop-fno-stack-protector-from-the-compiler-flags.patch @@ -34,7 +32,8 @@ BuildRequires: python3 # We need python3-devel for pathfix.py. BuildRequires: python3-devel BuildRequires: llvm-devel = %{version} -BuildRequires: llvm-static = %{version} + +Requires: clang-resource-filesystem%{?isa} = %{version} %description The compiler-rt project is a part of the LLVM project. It provides @@ -43,13 +42,15 @@ code generation, sanitizer runtimes and profiling library for code instrumentation, and Blocks C language extension. %prep -%autosetup -n %{crt_srcdir} -p1 + +%autosetup -n %{crt_srcdir} -p2 pathfix.py -i %{__python3} -pn lib/hwasan/scripts/hwasan_symbolize %build -mkdir -p _build -cd _build +mkdir -p %{_vpath_builddir} +cd %{_vpath_builddir} + %cmake .. -GNinja \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DLLVM_CONFIG_PATH:FILEPATH=%{_bindir}/llvm-config-%{__isa_bits} \ @@ -61,11 +62,12 @@ cd _build %endif -DCOMPILER_RT_INCLUDE_TESTS:BOOL=OFF # could be on? -%ninja_build +%cmake_build %install -cd _build -%ninja_install + +cd %{_vpath_builddir} +%cmake_install # move blacklist/abilist files to where clang expect them mkdir -p %{buildroot}%{_libdir}/clang/%{version}/share @@ -92,23 +94,34 @@ do target=`echo "$i" | sed -e 's/x86_64/i386/'` ln -s ../../../../../lib/clang/%{version}/lib/$target ../../../../%{_lib}/clang/%{version}/lib/linux/ done - + %endif - + popd %check -#make check-all -C _build + +#%%cmake_build --target check-compiler-rt %files %license LICENSE.TXT %{_includedir}/* -%{_libdir}/clang/%{version} +%{_libdir}/clang/%{version}/lib/* +%{_libdir}/clang/%{version}/share/* %ifarch x86_64 aarch64 %{_bindir}/hwasan_symbolize %endif %changelog +* Fri Jul 16 2021 sguelton@redhat.com - 12.0.1-1 +- 12.0.1 release + +* Tue May 25 2021 sguelton@redhat.com - 12.0.0-2 +- Backport several compatibility patches + +* Thu May 6 2021 sguelton@redhat.com - 12.0.0-1 +- 12.0.0 release + * Thu Oct 29 2020 sguelton@redhat.com - 11.0.0-1 - 11.0.0 final release