1 Star 0 Fork 8

kun-llfl/compiler-rt

forked from src-anolis-os/compiler-rt 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
compiler-rt.spec 3.17 KB
一键复制 编辑 原始数据 按行查看 历史
kun-llfl 提交于 2023-04-14 16:36 +08:00 . update version to 16.0.1
%define anolis_release 1
%global toolchain clang
%global compiler_rt_version 16.0.1
%global crt_srcdir compiler-rt-%{compiler_rt_version}.src
# see https://sourceware.org/bugzilla/show_bug.cgi?id=25271
%global optflags %(echo %{optflags} -D_DEFAULT_SOURCE)
# see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93615
%global optflags %(echo %{optflags} -Dasm=__asm__)
Summary: LLVM "compiler-rt" runtime libraries
Name: compiler-rt
Version: %{compiler_rt_version}
Release: %{anolis_release}%{?dist}
License: Apache-2.0 WITH LLVM-exception OR NCSA OR MIT
URL: http://llvm.org
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compiler_rt_version}/%{crt_srcdir}.tar.xz
BuildRequires: clang cmake ninja-build
BuildRequires: python3
# We need python3-devel for %%py3_shebang_fix
BuildRequires: python3-devel
# complier-rt needs llvm-devel to build, and they should be the same version
BuildRequires: llvm-devel = %{version}
Requires: clang-resource-filesystem = %{version}
%description
The compiler-rt project is a part of the LLVM project. It provides
implementation of the low-level target-specific hooks required by
code generation, sanitizer runtimes and profiling library for code
instrumentation, and Blocks C language extension.
%package doc
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
The %{name}-doc package contains documentations for %{name}
%prep
%autosetup -n %{crt_srcdir} -p2
%py3_shebang_fix lib/hwasan/scripts/hwasan_symbolize
%build
# Copy CFLAGS into ASMFLAGS, so -fcf-protection is used when compiling assembly files.
export ASMFLAGS=$CFLAGS
%cmake -GNinja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_MODULE_PATH=%{_libdir}/cmake/llvm \
-DCMAKE_SKIP_RPATH:BOOL=ON \
-DLLVM_LIBDIR_SUFFIX=64 \
-DCOMPILER_RT_INCLUDE_TESTS:BOOL=OFF
%cmake_build
%install
%cmake_install
# move blacklist/abilist files to where clang expect them
mkdir -p %{buildroot}%{_libdir}/clang/%{compiler_rt_version}/share
mv -v %{buildroot}%{_datadir}/*list.txt %{buildroot}%{_libdir}/clang/%{compiler_rt_version}/share/
# move sanitizer libs to better place
%global libclang_rt_installdir lib/linux
mkdir -p %{buildroot}%{_libdir}/clang/%{compiler_rt_version}/lib
mv -v %{buildroot}%{_prefix}/%{libclang_rt_installdir}/*clang_rt* %{buildroot}%{_libdir}/clang/%{compiler_rt_version}/lib
mv -v %{buildroot}%{_prefix}/%{libclang_rt_installdir}/liborc_rt-x86_64.a %{buildroot}%{_libdir}/clang/%{compiler_rt_version}/lib
mkdir -p %{buildroot}%{_libdir}/clang/%{compiler_rt_version}/lib/linux/
pushd %{buildroot}%{_libdir}/clang/%{compiler_rt_version}/lib
for i in *.a *.so
do
ln -s ../$i linux/$i
done
popd
%files
%license LICENSE.TXT
%{_includedir}/*
%{_libdir}/clang/%{compiler_rt_version}/lib/*
%{_libdir}/clang/%{compiler_rt_version}/share/*
%{_bindir}/hwasan_symbolize
%files doc
%doc README.txt CODE_OWNERS.TXT docs/TestingGuide.rst
%changelog
* Fri Apr 14 2023 Kun(llfl) <llfl@linux.alibaba.com> - 16.0.1-1
- update version to 16.0.1
* Wed Feb 1 2023 Funda Wang <fundawang@yeah.net> - 15.0.7-1
- New version 15.0.7
* Sun Jul 31 2022 happy_orange <songnannan@linux.alibaba.com> - 13.0.1-1
- Init pcakage from upstream
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/kun-llfl/compiler-rt.git
git@gitee.com:kun-llfl/compiler-rt.git
kun-llfl
compiler-rt
compiler-rt
a23

搜索帮助