diff --git a/0001-PATCH-compiler-rt-Workaround-libstdc-limitation-wrt..patch b/0001-PATCH-compiler-rt-Workaround-libstdc-limitation-wrt..patch deleted file mode 100644 index f734b5f950d8a064deaf80dff7c33ce7fcd3cced..0000000000000000000000000000000000000000 --- a/0001-PATCH-compiler-rt-Workaround-libstdc-limitation-wrt..patch +++ /dev/null @@ -1,43 +0,0 @@ -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/README.en.md b/README.en.md new file mode 100644 index 0000000000000000000000000000000000000000..abe3b4e6a32383d29b9ce13a90c2060f379a180a --- /dev/null +++ b/README.en.md @@ -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/) diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..efdc2f5f9e5c3105aba005a6d0bbc519aecb10a4 --- /dev/null +++ b/README.md @@ -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/) diff --git a/compiler-rt-12.0.1.src.tar.xz b/compiler-rt-12.0.1.src.tar.xz deleted file mode 100644 index 0e4d10aff466ba59a5114e75f25e431dee951de6..0000000000000000000000000000000000000000 Binary files a/compiler-rt-12.0.1.src.tar.xz and /dev/null differ diff --git a/compiler-rt-17.0.6.src.tar.xz b/compiler-rt-17.0.6.src.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..3a0df8ab060750bf22fff63841addf793ed4375d Binary files /dev/null and b/compiler-rt-17.0.6.src.tar.xz differ diff --git a/compiler-rt-17.0.6.src.tar.xz.sig b/compiler-rt-17.0.6.src.tar.xz.sig new file mode 100644 index 0000000000000000000000000000000000000000..29281c0a8597f12b039d946716b1ca0632e5e254 Binary files /dev/null and b/compiler-rt-17.0.6.src.tar.xz.sig differ diff --git a/compiler-rt.spec b/compiler-rt.spec index ad1d2c13e9711c8fd2f77308632d716b39b8d123..ffaf71ab57c24accf66c21af84036c58de33bd76 100644 --- a/compiler-rt.spec +++ b/compiler-rt.spec @@ -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 +%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 -%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 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__) 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 - 12.0.1-3 -- Change the install path. +* Tue Dec 5 2023 zhoujing - 17.0.6-1 +- Update to 17.0.6 * Tue Dec 20 2022 eastb233 - 12.0.1-2 - Delete run path in DSO @@ -168,4 +126,4 @@ fi - Update to 10.0.1 * Thu Dec 5 2019 openEuler Buildteam - 7.0.0-2 -- Package init +- Package init \ No newline at end of file diff --git a/tstellar-gpg-key.asc b/tstellar-gpg-key.asc deleted file mode 100644 index eba625c41a5fb1646d8b087acb97a6f079901712..0000000000000000000000000000000000000000 Binary files a/tstellar-gpg-key.asc and /dev/null differ