!2 升级到15.0.7
From: @cf-zhao Reviewed-by: @zhongyunde, @eastb233 Signed-off-by: @eastb233, @zhongyunde
This commit is contained in:
commit
edd0e50379
@ -1,4 +1,4 @@
|
||||
# lld
|
||||
# lld-15
|
||||
|
||||
#### Description
|
||||
LLVM Linker
|
||||
|
||||
@ -5,6 +5,8 @@ Subject: [PATCH 2/2] [PATCH][lld] Import compact_unwind_encoding.h from
|
||||
libunwind
|
||||
|
||||
This avoids an implicit cross package dependency
|
||||
|
||||
Signed-off-by: Chenxi Mao <chenxi.mao@suse.com>
|
||||
---
|
||||
lld/include/mach-o/compact_unwind_encoding.h | 477 +++++++++++++++++++++++++++
|
||||
1 file changed, 477 insertions(+)
|
||||
Binary file not shown.
BIN
lld-15.0.7.src.tar.xz
Normal file
BIN
lld-15.0.7.src.tar.xz
Normal file
Binary file not shown.
82
lld.spec
82
lld.spec
@ -1,12 +1,22 @@
|
||||
%global maj_ver 12
|
||||
%bcond_without check
|
||||
|
||||
%global maj_ver 15
|
||||
%global min_ver 0
|
||||
%global patch_ver 1
|
||||
%global patch_ver 7
|
||||
|
||||
%global pkg_name lld%{maj_ver}
|
||||
%global bin_suffix -%{maj_ver}
|
||||
%global install_prefix %{_libdir}/llvm%{maj_ver}
|
||||
%global install_includedir %{install_prefix}/include
|
||||
%global install_libdir %{install_prefix}/lib
|
||||
%global install_bindir %{install_prefix}/bin
|
||||
%global pkg_bindir %{install_bindir}
|
||||
|
||||
# Don't include unittests in automatic generation of provides or requires.
|
||||
%global __provides_exclude_from ^%{_libdir}/lld/.*$
|
||||
%global __requires_exclude ^libgtest.*$
|
||||
|
||||
Name: lld
|
||||
Name: %{pkg_name}
|
||||
Version: %{maj_ver}.%{min_ver}.%{patch_ver}
|
||||
Release: 1
|
||||
Summary: The LLVM Linker
|
||||
@ -15,19 +25,18 @@ License: NCSA
|
||||
URL: http://llvm.org
|
||||
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/lld-%{version}.src.tar.xz
|
||||
|
||||
Patch1: 0001-fedora-PATCH-lld-Import-compact_unwind_encoding.h-from-libu.patch
|
||||
Patch1: fedora-PATCH-lld-Import-compact_unwind_encoding.h-from-libu.patch
|
||||
|
||||
BuildRequires: clang
|
||||
BuildRequires: cmake
|
||||
BuildRequires: ninja-build
|
||||
BuildRequires: llvm-devel = %{version}
|
||||
BuildRequires: llvm%{maj_ver}-devel = %{version}
|
||||
BuildRequires: llvm%{maj_ver}-googletest = %{version}
|
||||
BuildRequires: llvm%{maj_ver}-test = %{version}
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: python3-devel
|
||||
|
||||
# For make check:
|
||||
BuildRequires: ninja-build
|
||||
BuildRequires: python3-rpm-macros
|
||||
BuildRequires: python3-lit
|
||||
BuildRequires: python3-lit >= %{version}
|
||||
BuildRequires: zlib-devel
|
||||
|
||||
Requires(post): %{_sbindir}/update-alternatives
|
||||
Requires(preun): %{_sbindir}/update-alternatives
|
||||
@ -58,40 +67,61 @@ Shared libraries for LLD.
|
||||
mkdir -p _build
|
||||
cd _build
|
||||
%cmake .. -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=%{install_prefix} \
|
||||
-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
|
||||
-DLLVM_DYLIB_COMPONENTS="all" \
|
||||
-DCMAKE_SKIP_RPATH:BOOL=ON \
|
||||
-DPYTHON_EXECUTABLE=%{__python3} \
|
||||
-DLLVM_INCLUDE_TESTS=OFF \
|
||||
-DLLVM_MAIN_SRC_DIR=%{_datadir}/llvm/src
|
||||
-DLLVM_INCLUDE_TESTS=ON \
|
||||
-DLLVM_EXTERNAL_LIT=%{_bindir}/lit \
|
||||
-DLLVM_LIT_ARGS="-sv \
|
||||
--path %{_libdir}/llvm%{maj_ver}" \
|
||||
-DLLVM_MAIN_SRC_DIR=%{_libdir}/llvm%{maj_ver}/src
|
||||
|
||||
%ninja_build
|
||||
|
||||
%install
|
||||
%ninja_install -C _build
|
||||
|
||||
rm %{buildroot}%{_includedir}/mach-o/compact_unwind_encoding.h
|
||||
rm %{buildroot}%{install_includedir}/mach-o/compact_unwind_encoding.h
|
||||
|
||||
# Add version suffix to binaries
|
||||
mkdir -p %{buildroot}/%{_bindir}
|
||||
for f in %{buildroot}/%{install_bindir}/*; do
|
||||
filename=`basename $f`
|
||||
ln -s ../../%{install_bindir}/$filename %{buildroot}/%{_bindir}/$filename%{bin_suffix}
|
||||
done
|
||||
|
||||
%check
|
||||
%if %{with check}
|
||||
cd _build
|
||||
%ninja_build check-lld
|
||||
%endif
|
||||
|
||||
%files
|
||||
%license LICENSE.TXT
|
||||
%{_bindir}/lld*
|
||||
%{_bindir}/ld.lld
|
||||
%{_bindir}/ld64.lld
|
||||
%{_bindir}/ld64.lld.darwinnew
|
||||
%{_bindir}/wasm-ld
|
||||
%{_bindir}/lld%{bin_suffix}
|
||||
%{_bindir}/lld-link%{bin_suffix}
|
||||
%{_bindir}/ld.lld%{bin_suffix}
|
||||
%{_bindir}/ld64.lld%{bin_suffix}
|
||||
%{_bindir}/wasm-ld%{bin_suffix}
|
||||
%{pkg_bindir}
|
||||
|
||||
%files devel
|
||||
%{_includedir}/lld
|
||||
%{_libdir}/liblld*.so
|
||||
%{_libdir}/cmake/lld/
|
||||
%{install_includedir}/lld
|
||||
%{install_libdir}/liblld*.so
|
||||
%{install_libdir}/cmake/lld/
|
||||
|
||||
%files libs
|
||||
%{_libdir}/liblld*.so.*
|
||||
%{install_libdir}/liblld*.so.*
|
||||
|
||||
%changelog
|
||||
* Mon Feb 18 2023 cf-zhao <zhaochuanfeng@huawei.com> - 12.0.1-1
|
||||
- Package init
|
||||
* Mon Feb 20 2023 Chenxi Mao <chenxi.mao@suse.com> - 15.0.7-1
|
||||
- Upgrade to 15.0.7.
|
||||
|
||||
* Thu Feb 9 2023 Chenxi Mao <chenxi.mao@suse.com> - 15.0.6-2
|
||||
- Enable lld unit test.
|
||||
|
||||
* Mon Jan 2 2023 Chenxi Mao <chenxi.mao@suse.com> - 15.0.6-1
|
||||
- Package init
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user