|
|
|
@ -1,6 +1,9 @@
|
|
|
|
|
#%%global rc_ver 5
|
|
|
|
|
%global lld_srcdir lld-%{version}%{?rc_ver:rc%{rc_ver}}.src
|
|
|
|
|
%global maj_ver 12
|
|
|
|
|
%bcond_without check
|
|
|
|
|
|
|
|
|
|
#global rc_ver 4
|
|
|
|
|
%global lld_srcdir lld-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src
|
|
|
|
|
%global baserelease 2
|
|
|
|
|
%global maj_ver 13
|
|
|
|
|
%global min_ver 0
|
|
|
|
|
%global patch_ver 1
|
|
|
|
|
|
|
|
|
@ -12,7 +15,7 @@
|
|
|
|
|
|
|
|
|
|
Name: lld
|
|
|
|
|
Version: %{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}}
|
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
Release: %{baserelease}%{?rc_ver:.rc%{rc_ver}}%{?dist}
|
|
|
|
|
Summary: The LLVM Linker
|
|
|
|
|
|
|
|
|
|
License: NCSA
|
|
|
|
@ -30,6 +33,7 @@ Patch0: 0001-PATCH-lld-CMake-Check-for-gtest-headers-even-if-lit..patch
|
|
|
|
|
# Bundle libunwind header need during build for MachO support
|
|
|
|
|
Patch1: 0002-PATCH-lld-Import-compact_unwind_encoding.h-from-libu.patch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BuildRequires: gcc
|
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
|
BuildRequires: cmake
|
|
|
|
@ -72,22 +76,10 @@ Summary: LLD shared libraries
|
|
|
|
|
%description libs
|
|
|
|
|
Shared libraries for LLD.
|
|
|
|
|
|
|
|
|
|
%package test
|
|
|
|
|
Summary: LLD regression tests
|
|
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
|
Requires: python3-lit
|
|
|
|
|
Requires: llvm-test(major) = %{maj_ver}
|
|
|
|
|
Requires: lld-libs = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description test
|
|
|
|
|
LLVM regression tests.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
|
|
|
|
|
%autosetup -n %{lld_srcdir} -p2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
|
|
# Disable lto since it causes the COFF/libpath.test lit test to crash.
|
|
|
|
@ -115,46 +107,7 @@ cd %{_vpath_builddir}
|
|
|
|
|
|
|
|
|
|
%cmake_build
|
|
|
|
|
|
|
|
|
|
# Build the unittests so we can install them.
|
|
|
|
|
%cmake_build --target lld-test-depends
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
|
|
|
|
|
%global lit_cfg test/%{_arch}.site.cfg.py
|
|
|
|
|
%global lit_unit_cfg test/Unit/%{_arch}.site.cfg.py
|
|
|
|
|
%global lit_lld_test_cfg_install_path %{_datadir}/lld/lit.lld-test.cfg.py
|
|
|
|
|
|
|
|
|
|
# Generate lit config files. Strip off the last line that initiates the
|
|
|
|
|
# test run, so we can customize the configuration.
|
|
|
|
|
head -n -1 %{_target_platform}/test/lit.site.cfg.py >> %{lit_cfg}
|
|
|
|
|
head -n -1 %{_target_platform}/test/Unit/lit.site.cfg.py >> %{lit_unit_cfg}
|
|
|
|
|
|
|
|
|
|
# Patch lit config files to load custom config:
|
|
|
|
|
for f in %{lit_cfg} %{lit_unit_cfg}; do
|
|
|
|
|
echo "lit_config.load_config(config, '%{lit_lld_test_cfg_install_path}')" >> $f
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
# Install test files
|
|
|
|
|
install -d %{buildroot}%{_datadir}/lld/src
|
|
|
|
|
cp %{SOURCE4} %{buildroot}%{_datadir}/lld/
|
|
|
|
|
|
|
|
|
|
# The various tar options are there to make sur the archive is the same on 32 and 64 bit arch, i.e.
|
|
|
|
|
# the archive creation is reproducible. Move arch-specific content out of the tarball
|
|
|
|
|
mv %{lit_cfg} %{buildroot}%{_datadir}/lld/src/%{_arch}.site.cfg.py
|
|
|
|
|
mv %{lit_unit_cfg} %{buildroot}%{_datadir}/lld/src/%{_arch}.Unit.site.cfg.py
|
|
|
|
|
tar --sort=name --mtime='UTC 2020-01-01' -c test/ | gzip -n > %{buildroot}%{_datadir}/lld/src/test.tar.gz
|
|
|
|
|
|
|
|
|
|
install -d %{buildroot}%{_libexecdir}/tests/lld
|
|
|
|
|
install -m 0755 %{SOURCE3} %{buildroot}%{_libexecdir}/tests/lld
|
|
|
|
|
|
|
|
|
|
# Install unit test binaries
|
|
|
|
|
install -d %{buildroot}%{_libdir}/lld/
|
|
|
|
|
cp -R %{_target_platform}/unittests %{buildroot}%{_libdir}/lld/
|
|
|
|
|
rm -rf `find %{buildroot}%{_libdir}/lld/ -iname '*make*'`
|
|
|
|
|
|
|
|
|
|
# Install gtest libraries
|
|
|
|
|
cp %{_target_platform}/%{_lib}/libgtest*so* %{buildroot}%{_libdir}/lld/
|
|
|
|
|
|
|
|
|
|
# Install libraries and binaries
|
|
|
|
|
cd %{_target_platform}
|
|
|
|
|
|
|
|
|
@ -196,6 +149,7 @@ cd %{_vpath_builddir}
|
|
|
|
|
%{_bindir}/ld.lld
|
|
|
|
|
%{_bindir}/ld64.lld
|
|
|
|
|
%{_bindir}/ld64.lld.darwinnew
|
|
|
|
|
%{_bindir}/ld64.lld.darwinold
|
|
|
|
|
%{_bindir}/wasm-ld
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
@ -206,15 +160,16 @@ cd %{_vpath_builddir}
|
|
|
|
|
%files libs
|
|
|
|
|
%{_libdir}/liblld*.so.*
|
|
|
|
|
|
|
|
|
|
%files test
|
|
|
|
|
%{_libexecdir}/tests/lld/
|
|
|
|
|
%{_libdir}/lld/
|
|
|
|
|
%{_datadir}/lld/src/test.tar.gz
|
|
|
|
|
%{_datadir}/lld/src/%{_arch}.site.cfg.py
|
|
|
|
|
%{_datadir}/lld/src/%{_arch}.Unit.site.cfg.py
|
|
|
|
|
%{_datadir}/lld/lit.lld-test.cfg.py
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Thu Feb 03 2022 Tom Stellard <tstellar@redhat.com> - 13.0.1-1
|
|
|
|
|
- 13.0.1 Release
|
|
|
|
|
|
|
|
|
|
* Thu Dec 09 2021 Tom Stellard <tstellar@redhat.com> - 13.0.0-2
|
|
|
|
|
- Drop lld-test package
|
|
|
|
|
|
|
|
|
|
* Fri Oct 15 2021 Tom Stellard <tstellar@redhat.com> - 13.0.0-1
|
|
|
|
|
- 13.0.0 Release
|
|
|
|
|
|
|
|
|
|
* Fri Jul 16 2021 sguelton@redhat.com - 12.0.1-1
|
|
|
|
|
- 12.0.1 release
|
|
|
|
|
|
|
|
|
|