import compiler-rt-12.0.1-1.module+el8.5.0+11871+08d0eab5

This commit is contained in:
CentOS Sources 2021-11-09 04:55:58 -05:00 committed by Stepan Oksanichenko
parent d8ff6ae4ec
commit 208917a40b
7 changed files with 77 additions and 49 deletions

View File

@ -1 +1,2 @@
c492a0142887efbe667f6b3994b43a48f53d4832 SOURCES/compiler-rt-11.0.1.src.tar.xz
d33af648dc9b901c6c9f6c5872af2f59203f1a25 SOURCES/compiler-rt-12.0.1.src.tar.xz
b8d2648a01d36ed0186fd2c5af325fd28797f9a0 SOURCES/tstellar-gpg-key.asc

3
.gitignore vendored
View File

@ -1 +1,2 @@
SOURCES/compiler-rt-11.0.1.src.tar.xz
SOURCES/compiler-rt-12.0.1.src.tar.xz
SOURCES/tstellar-gpg-key.asc

View File

@ -0,0 +1,43 @@
From 8247295860b69fd379e282c3e6315df9f700e4d8 Mon Sep 17 00:00:00 2001
From: serge-sans-paille <sguelton@redhat.com>
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<typename T>
template<class Other>
struct rebind { typedef fuzzer_allocator<Other> other; };
+
+ template< class U, class... Args >
+ void construct( U* p, Args&&... args ) {
+ std::allocator<T>::construct(p, std::forward<Args>(args)...);
+ }
+
};
template<typename T>
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<std::string> &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

View File

@ -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<class Other>
struct rebind { typedef fuzzer_allocator<Other> other; };
+
+ template< class U, class... Args >
+ void construct( U* p, Args&&... args ) {
+ std::allocator<T>::construct(p, std::forward<Args>(args)...);
+ }
+
};
template<typename T>
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;

Binary file not shown.

View File

@ -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,16 +9,17 @@
%global optflags %(echo %{optflags} -Dasm=__asm__)
Name: compiler-rt
Version: 11.0.1
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: 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
@ -33,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
@ -42,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} \
@ -60,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
@ -97,19 +100,27 @@ done
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
* Thu Sep 02 2021 Tom Stellard <tstellar@redhat.com> - 11.0.1-1
- 11.0.1 Release
* 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