Update to 17.0.6

This commit is contained in:
zhoujing 2023-12-05 11:03:32 +08:00
parent 1cd382a557
commit 7fa4001724
8 changed files with 81 additions and 124 deletions

View File

@ -1,43 +0,0 @@
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

21
README.en.md Normal file
View File

@ -0,0 +1,21 @@
# compiler-rt
#### Description
The llvm compiler support routines
#### Contribution
1. Fork the repository
2. Create Feat_xxx branch
3. Commit your code
4. Create Pull Request
#### Gitee Feature
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
4. The most valuable open source project [GVP](https://gitee.com/gvp)
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

21
README.md Normal file
View File

@ -0,0 +1,21 @@
# compiler-rt
#### 介绍
The llvm compiler support routines
#### 参与贡献
1. Fork 本仓库
2. 新建 Feat_xxx 分支
3. 提交代码
4. 新建 Pull Request
#### 特技
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com)
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目
4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,42 +1,39 @@
%bcond_with sys_llvm
%bcond_without sys_llvm
%bcond_without check
%global maj_ver 12
%global maj_ver 17
%global min_ver 0
%global patch_ver 1
%if %{with sys_llvm}
%global pkg_name compiler-rt
%global install_prefix %{_prefix}
%else
%global pkg_name compiler-rt%{maj_ver}
%global install_prefix %{_libdir}/llvm%{maj_ver}
%endif
%global install_bindir %{install_prefix}/bin
%if 0%{?__isa_bits} == 64
%global install_libdir %{install_prefix}/lib64
%else
%global install_libdir %{install_prefix}/lib
%endif
%global install_includedir %{install_prefix}/include
%global install_sharedir %{install_prefix}/share
%global patch_ver 6
%global crt_version %{maj_ver}.%{min_ver}.%{patch_ver}
%global crt_srcdir compiler-rt-%{version}%{?rc_ver:rc%{rc_ver}}.src
%global optflags %(echo %{optflags} -D_DEFAULT_SOURCE)
%global optflags %(echo %{optflags} -Dasm=__asm__)
%if %{with sys_llvm}
%global pkg_name compiler-rt
%global install_prefix %{_prefix}
%global install_datadir %{_datadir}
%else
%global pkg_name compiler-rt%{maj_ver}
%global install_prefix %{_libdir}/llvm%{maj_ver}
%global install_datadir %{install_prefix}/share
%endif
%if 0%{?__isa_bits} == 64
%global install_libdir %{install_prefix}/lib64
%else
%global install_libdir %{install_prefix}/lib
%endif
Name: %{pkg_name}
Version: %{crt_version}
Release: 3
Release: 1
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}/%{crt_srcdir}.tar.xz
Patch1: 0001-PATCH-compiler-rt-Workaround-libstdc-limitation-wrt..patch
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{crt_srcdir}.tar.xz.sig
BuildRequires: gcc
BuildRequires: gcc-c++
@ -45,17 +42,17 @@ BuildRequires: ninja-build
BuildRequires: python3
# We need python3-devel for pathfix.py.
BuildRequires: python3-devel
%if %{with sys_llvm}
BuildRequires: llvm-devel = %{version}
BuildRequires: llvm-test = %{version}
Requires: clang-resource-filesystem%{?isa} = %{version}
BuildRequires: llvm-cmake-utils = %{version}
%else
BuildRequires: llvm%{maj_ver}-devel = %{version}
BuildRequires: llvm%{maj_ver}-test = %{version}
Requires: clang%{maj_ver}-resource-filesystem%{?isa} = %{version}
BuildRequires: llvm%{maj_ver}-cmake-utils = %{version}
%endif
%description
The compiler-rt project is a part of the LLVM project. It provides
implementation of the low-level target-specific hooks required by
@ -64,6 +61,9 @@ instrumentation, and Blocks C language extension.
%prep
%autosetup -n %{crt_srcdir} -p2
# compiler-rt does not allow configuring LLVM_COMMON_CMAKE_UTILS.
ln -s %{install_datadir}/llvm/cmake ../cmake
pathfix.py -i %{__python3} -pn lib/hwasan/scripts/hwasan_symbolize
%build
@ -73,10 +73,10 @@ mkdir -p _build
cd _build
%cmake .. \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=%{install_prefix} \
-DCMAKE_MODULE_PATH=%{install_libdir}/cmake/llvm \
-DLLVM_CONFIG_PATH=%{install_bindir}/llvm-config \
-DCMAKE_SKIP_RPATH:BOOL=ON \
-DCOMPILER_RT_INSTALL_PATH=%{install_libdir}/clang/%{maj_ver} \
-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON \
%if 0%{?__isa_bits} == 64
-DLLVM_LIBDIR_SUFFIX=64 \
%else
@ -90,67 +90,25 @@ cd _build
cd _build
%make_install
# move blacklist/abilist files to where clang expect them
mkdir -p %{buildroot}%{install_libdir}/clang/%{version}/share
mv -v %{buildroot}%{install_sharedir}/*list.txt %{buildroot}%{install_libdir}/clang/%{version}/share/
# move sanitizer libs to better place
%global libclang_rt_installdir lib/linux
mkdir -p %{buildroot}%{install_libdir}/clang/%{version}/lib
mv -v %{buildroot}%{install_prefix}/%{libclang_rt_installdir}/*clang_rt* %{buildroot}%{install_libdir}/clang/%{version}/lib
mkdir -p %{buildroot}%{install_libdir}/clang/%{version}/lib/linux/
pushd %{buildroot}%{install_libdir}/clang/%{version}/lib
for i in *.a *.so
do
ln -s ../$i linux/$i
done
popd
# 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 %{ix86}
%post
if test "`uname -m`" = x86_64
then
cd %{install_libdir}/clang/%{version}/lib
mkdir -p ../../../../lib64/clang/%{version}/lib
for i in *.a *.so
do
ln -s ../../../../%{_lib}/clang/%{version}/lib/$i ../../../../lib64/clang/%{version}/lib/$i
done
fi
%preun
if test "`uname -m`" = x86_64
then
cd %{install_libdir}/clang/%{version}/lib
for i in *.a *.so
do
rm ../../../../lib64/clang/%{version}/lib/$i
done
rmdir -p ../../../../lib64/clang/%{version}/lib 2>/dev/null 1>/dev/null || :
fi
%endif
%check
#%%cmake_build --target check-compiler-rt
%files
%license LICENSE.TXT
%{install_includedir}/*
%{install_libdir}/clang/%{version}/lib/*
%{install_libdir}/clang/%{version}/share/*
%ifarch x86_64 aarch64
%{install_bindir}/hwasan_symbolize
%{install_libdir}/clang/%{maj_ver}/bin/*
%endif
%{install_libdir}/clang/%{maj_ver}/include/*
%{install_libdir}/clang/%{maj_ver}/lib/*
%{install_libdir}/clang/%{maj_ver}/share/*
%ifarch x86_64 aarch64
%{install_libdir}/clang/%{maj_ver}/bin/hwasan_symbolize
%endif
%changelog
* Thu Jul 20 2023 cf0zhao <zhaochuanfeng@huawei.com> - 12.0.1-3
- Change the install path.
* Tue Dec 5 2023 zhoujing <zhoujing106@huawei.com> - 17.0.6-1
- Update to 17.0.6
* Tue Dec 20 2022 eastb233 <xiezhiheng@huawei.com> - 12.0.1-2
- Delete run path in DSO

Binary file not shown.