|
|
5a4962 |
#%%global rc_ver 6
|
|
|
5a4962 |
%global baserelease 3
|
|
|
3d81c9 |
%global lld_srcdir lld-%{version}%{?rc_ver:rc%{rc_ver}}.src
|
|
|
df91b0 |
%global maj_ver 11
|
|
|
3d81c9 |
%global min_ver 0
|
|
|
df91b0 |
%global patch_ver 0
|
|
|
3d81c9 |
|
|
|
3d81c9 |
# Don't include unittests in automatic generation of provides or requires.
|
|
|
3d81c9 |
%global __provides_exclude_from ^%{_libdir}/lld/.*$
|
|
|
3d81c9 |
%global __requires_exclude ^libgtest.*$
|
|
|
3d81c9 |
|
|
|
3d81c9 |
%bcond_with ld_alternative
|
|
|
3d81c9 |
|
|
|
3d81c9 |
Name: lld
|
|
|
3d81c9 |
Version: %{maj_ver}.%{min_ver}.%{patch_ver}
|
|
|
3d81c9 |
Release: %{baserelease}%{?rc_ver:.rc%{rc_ver}}%{?dist}
|
|
|
3d81c9 |
Summary: The LLVM Linker
|
|
|
3d81c9 |
|
|
|
3d81c9 |
License: NCSA
|
|
|
3d81c9 |
URL: http://llvm.org
|
|
|
df91b0 |
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}%{?rc_ver:-rc%{rc_ver}}/%{lld_srcdir}.tar.xz
|
|
|
df91b0 |
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}%{?rc_ver:-rc%{rc_ver}}/%{lld_srcdir}.tar.xz.sig
|
|
|
df91b0 |
Source2: https://prereleases.llvm.org/%{version}/hans-gpg-key.asc
|
|
|
df91b0 |
Source3: run-lit-tests
|
|
|
df91b0 |
Source4: lit.lld-test.cfg.py
|
|
|
3d81c9 |
|
|
|
3d81c9 |
Patch0: 0001-CMake-Check-for-gtest-headers-even-if-lit.py-is-not-.patch
|
|
|
df91b0 |
Patch1: 0001-Revert-lld-Initial-commit-for-new-Mach-O-backend.patch
|
|
|
3d81c9 |
|
|
|
5a4962 |
ExcludeArch: s390x
|
|
|
5a4962 |
|
|
|
3d81c9 |
BuildRequires: gcc
|
|
|
3d81c9 |
BuildRequires: gcc-c++
|
|
|
3d81c9 |
BuildRequires: cmake
|
|
|
df91b0 |
BuildRequires: ninja-build
|
|
|
3d81c9 |
BuildRequires: llvm-devel = %{version}
|
|
|
3d81c9 |
BuildRequires: llvm-test = %{version}
|
|
|
3d81c9 |
BuildRequires: ncurses-devel
|
|
|
3d81c9 |
BuildRequires: zlib-devel
|
|
|
df91b0 |
BuildRequires: python3-devel
|
|
|
3d81c9 |
|
|
|
3d81c9 |
# For make check:
|
|
|
3d81c9 |
BuildRequires: python3-rpm-macros
|
|
|
3d81c9 |
BuildRequires: python3-lit
|
|
|
3d81c9 |
BuildRequires: llvm-googletest = %{version}
|
|
|
3d81c9 |
|
|
|
3d81c9 |
%if %{with ld_alternative}
|
|
|
3d81c9 |
Requires(post): %{_sbindir}/alternatives
|
|
|
3d81c9 |
Requires(preun): %{_sbindir}/alternatives
|
|
|
3d81c9 |
%endif
|
|
|
3d81c9 |
|
|
|
3d81c9 |
Requires: lld-libs = %{version}-%{release}
|
|
|
3d81c9 |
|
|
|
3d81c9 |
%description
|
|
|
3d81c9 |
The LLVM project linker.
|
|
|
3d81c9 |
|
|
|
3d81c9 |
%package devel
|
|
|
3d81c9 |
Summary: Libraries and header files for LLD
|
|
|
df91b0 |
Requires: lld-libs%{?_isa} = %{version}-%{release}
|
|
|
df91b0 |
# lld tools are referenced in the cmake files, so we need to add lld as a
|
|
|
df91b0 |
# dependency.
|
|
|
df91b0 |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
3d81c9 |
|
|
|
3d81c9 |
%description devel
|
|
|
3d81c9 |
This package contains library and header files needed to develop new native
|
|
|
3d81c9 |
programs that use the LLD infrastructure.
|
|
|
3d81c9 |
|
|
|
3d81c9 |
%package libs
|
|
|
3d81c9 |
Summary: LLD shared libraries
|
|
|
3d81c9 |
|
|
|
3d81c9 |
%description libs
|
|
|
3d81c9 |
Shared libraries for LLD.
|
|
|
3d81c9 |
|
|
|
3d81c9 |
%package test
|
|
|
3d81c9 |
Summary: LLD regression tests
|
|
|
3d81c9 |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
3d81c9 |
Requires: python3-lit
|
|
|
3d81c9 |
Requires: llvm-test(major) = %{maj_ver}
|
|
|
3d81c9 |
Requires: lld-libs = %{version}-%{release}
|
|
|
3d81c9 |
|
|
|
3d81c9 |
%description test
|
|
|
3d81c9 |
LLVM regression tests.
|
|
|
3d81c9 |
|
|
|
3d81c9 |
%prep
|
|
|
df91b0 |
|
|
|
df91b0 |
%setup -q -n %{lld_srcdir}
|
|
|
df91b0 |
|
|
|
df91b0 |
%patch0 -p1 -b .gtest-fix
|
|
|
df91b0 |
# Remove the MachO backend since it doesn't seem to work on big-endian hosts.
|
|
|
df91b0 |
%ifarch s390x
|
|
|
df91b0 |
%patch1 -p2 -b .remove-MachO
|
|
|
df91b0 |
%endif
|
|
|
df91b0 |
|
|
|
3d81c9 |
|
|
|
3d81c9 |
%build
|
|
|
3d81c9 |
|
|
|
3d81c9 |
mkdir %{_target_platform}
|
|
|
3d81c9 |
cd %{_target_platform}
|
|
|
3d81c9 |
|
|
|
3d81c9 |
%cmake .. \
|
|
|
df91b0 |
-GNinja \
|
|
|
3d81c9 |
-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
|
|
|
3d81c9 |
-DLLVM_DYLIB_COMPONENTS="all" \
|
|
|
df91b0 |
-DCMAKE_SKIP_RPATH:BOOL=ON \
|
|
|
3d81c9 |
-DPYTHON_EXECUTABLE=%{__python3} \
|
|
|
3d81c9 |
-DLLVM_INCLUDE_TESTS=ON \
|
|
|
3d81c9 |
-DLLVM_MAIN_SRC_DIR=%{_datadir}/llvm/src \
|
|
|
3d81c9 |
-DLLVM_EXTERNAL_LIT=%{_bindir}/lit \
|
|
|
3d81c9 |
-DLLVM_LIT_ARGS="-sv \
|
|
|
3d81c9 |
--path %{_libdir}/llvm" \
|
|
|
3d81c9 |
%if 0%{?__isa_bits} == 64
|
|
|
3d81c9 |
-DLLVM_LIBDIR_SUFFIX=64
|
|
|
3d81c9 |
%else
|
|
|
3d81c9 |
-DLLVM_LIBDIR_SUFFIX=
|
|
|
3d81c9 |
%endif
|
|
|
3d81c9 |
|
|
|
df91b0 |
%ninja_build
|
|
|
3d81c9 |
|
|
|
3d81c9 |
# Build the unittests so we can install them.
|
|
|
df91b0 |
%ninja_build lld-test-depends
|
|
|
3d81c9 |
|
|
|
3d81c9 |
%install
|
|
|
3d81c9 |
|
|
|
3d81c9 |
%global lit_cfg test/%{_arch}.site.cfg.py
|
|
|
3d81c9 |
%global lit_unit_cfg test/Unit/%{_arch}.site.cfg.py
|
|
|
3d81c9 |
%global lit_lld_test_cfg_install_path %{_datadir}/lld/lit.lld-test.cfg.py
|
|
|
3d81c9 |
|
|
|
3d81c9 |
# Generate lit config files. Strip off the last line that initiates the
|
|
|
3d81c9 |
# test run, so we can customize the configuration.
|
|
|
3d81c9 |
head -n -1 %{_target_platform}/test/lit.site.cfg.py >> %{lit_cfg}
|
|
|
3d81c9 |
head -n -1 %{_target_platform}/test/Unit/lit.site.cfg.py >> %{lit_unit_cfg}
|
|
|
3d81c9 |
|
|
|
3d81c9 |
# Patch lit config files to load custom config:
|
|
|
3d81c9 |
for f in %{lit_cfg} %{lit_unit_cfg}; do
|
|
|
3d81c9 |
echo "lit_config.load_config(config, '%{lit_lld_test_cfg_install_path}')" >> $f
|
|
|
3d81c9 |
done
|
|
|
3d81c9 |
|
|
|
3d81c9 |
# Install test files
|
|
|
3d81c9 |
install -d %{buildroot}%{_datadir}/lld/src
|
|
|
df91b0 |
cp %{SOURCE4} %{buildroot}%{_datadir}/lld/
|
|
|
3d81c9 |
|
|
|
1d4e6c |
# The various tar options are there to make sur the archive is the same on 32 and 64 bit arch, i.e.
|
|
|
1d4e6c |
# the archive creation is reproducible. Move arch-specific content out of the tarball
|
|
|
1d4e6c |
mv %{lit_cfg} %{buildroot}%{_datadir}/lld/src/%{_arch}.site.cfg.py
|
|
|
1d4e6c |
mv %{lit_unit_cfg} %{buildroot}%{_datadir}/lld/src/%{_arch}.Unit.site.cfg.py
|
|
|
1d4e6c |
tar --sort=name --mtime='UTC 2020-01-01' -c test/ | gzip -n > %{buildroot}%{_datadir}/lld/src/test.tar.gz
|
|
|
1d4e6c |
|
|
|
3d81c9 |
install -d %{buildroot}%{_libexecdir}/tests/lld
|
|
|
df91b0 |
cp %{SOURCE3} %{buildroot}%{_libexecdir}/tests/lld
|
|
|
3d81c9 |
|
|
|
3d81c9 |
# Install unit test binaries
|
|
|
3d81c9 |
install -d %{buildroot}%{_libdir}/lld/
|
|
|
3d81c9 |
cp -R %{_target_platform}/unittests %{buildroot}%{_libdir}/lld/
|
|
|
3d81c9 |
rm -rf `find %{buildroot}%{_libdir}/lld/ -iname '*make*'`
|
|
|
3d81c9 |
|
|
|
3d81c9 |
# Install gtest libraries
|
|
|
3d81c9 |
cp %{_target_platform}/%{_lib}/libgtest*so* %{buildroot}%{_libdir}/lld/
|
|
|
3d81c9 |
|
|
|
3d81c9 |
# Install libraries and binaries
|
|
|
3d81c9 |
cd %{_target_platform}
|
|
|
df91b0 |
%ninja_install
|
|
|
3d81c9 |
|
|
|
3d81c9 |
%if %{with ld_alternative}
|
|
|
3d81c9 |
# Required when using update-alternatives:
|
|
|
3d81c9 |
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Alternatives/
|
|
|
3d81c9 |
touch %{buildroot}%{_bindir}/ld
|
|
|
3d81c9 |
|
|
|
3d81c9 |
%post
|
|
|
3d81c9 |
%{_sbindir}/update-alternatives --install %{_bindir}/ld ld %{_bindir}/ld.lld 1
|
|
|
3d81c9 |
|
|
|
3d81c9 |
%postun
|
|
|
3d81c9 |
if [ $1 -eq 0 ] ; then
|
|
|
3d81c9 |
%{_sbindir}/update-alternatives --remove ld %{_bindir}/ld.lld
|
|
|
3d81c9 |
fi
|
|
|
3d81c9 |
%endif
|
|
|
3d81c9 |
|
|
|
3d81c9 |
%check
|
|
|
3d81c9 |
|
|
|
3d81c9 |
# armv7lhl tests disabled because of arm issue, see https://koji.fedoraproject.org/koji/taskinfo?taskID=33660162
|
|
|
3d81c9 |
%ifnarch %{arm}
|
|
|
df91b0 |
%ninja_build -C %{_target_platform} %{?_smp_mflags} check-lld
|
|
|
3d81c9 |
%endif
|
|
|
3d81c9 |
|
|
|
3d81c9 |
%ldconfig_scriptlets libs
|
|
|
3d81c9 |
|
|
|
3d81c9 |
%files
|
|
|
df91b0 |
%license LICENSE.TXT
|
|
|
3d81c9 |
%if %{with ld_alternative}
|
|
|
3d81c9 |
%ghost %{_bindir}/ld
|
|
|
3d81c9 |
%endif
|
|
|
3d81c9 |
%{_bindir}/lld*
|
|
|
3d81c9 |
%{_bindir}/ld.lld
|
|
|
3d81c9 |
%{_bindir}/ld64.lld
|
|
|
3d81c9 |
%{_bindir}/wasm-ld
|
|
|
3d81c9 |
|
|
|
3d81c9 |
%files devel
|
|
|
3d81c9 |
%{_includedir}/lld
|
|
|
3d81c9 |
%{_libdir}/liblld*.so
|
|
|
df91b0 |
%{_libdir}/cmake/lld/
|
|
|
3d81c9 |
|
|
|
3d81c9 |
%files libs
|
|
|
3d81c9 |
%{_libdir}/liblld*.so.*
|
|
|
3d81c9 |
|
|
|
3d81c9 |
%files test
|
|
|
3d81c9 |
%{_libexecdir}/tests/lld/
|
|
|
3d81c9 |
%{_libdir}/lld/
|
|
|
3d81c9 |
%{_datadir}/lld/src/test.tar.gz
|
|
|
1d4e6c |
%{_datadir}/lld/src/%{_arch}.site.cfg.py
|
|
|
1d4e6c |
%{_datadir}/lld/src/%{_arch}.Unit.site.cfg.py
|
|
|
3d81c9 |
%{_datadir}/lld/lit.lld-test.cfg.py
|
|
|
3d81c9 |
|
|
|
3d81c9 |
%changelog
|
|
|
5a4962 |
* Mon Nov 09 2020 sguelton@redhat.com - 11.0.0-3
|
|
|
5a4962 |
- Exclude s390x, see rhbz#1894927
|
|
|
5a4962 |
|
|
|
5a4962 |
* Thu Oct 29 2020 sguelton@redhat.com - 11.0.0-1
|
|
|
5a4962 |
- 11.0.0 final
|
|
|
5a4962 |
|
|
|
df91b0 |
* Fri Sep 18 2020 sguelton@redhat.com - 11.0.0-0.1.rc2
|
|
|
df91b0 |
- 11.0.0-rc2 Release
|
|
|
df91b0 |
|
|
|
1d4e6c |
* Fri Jul 24 2020 sguelton@redhat.com - 10.0.1-1
|
|
|
1d4e6c |
- 10.0.1 release
|
|
|
1d4e6c |
|
|
|
1d4e6c |
* Mon Jul 20 2020 sguelton@redhat.com - 10.0.0-2
|
|
|
1d4e6c |
- Fix arch-dependent tarball
|
|
|
1d4e6c |
|
|
|
3d81c9 |
* Thu Apr 9 2020 sguelton@redhat.com - 10.0.0-1
|
|
|
3d81c9 |
- 10.0.0 final
|
|
|
3d81c9 |
|
|
|
3d81c9 |
* Thu Dec 19 2019 Tom Stellard <tstellar@redhat.com> -9.0.1-1
|
|
|
3d81c9 |
- 9.0.1 Release
|
|
|
3d81c9 |
|
|
|
3d81c9 |
* Fri Dec 13 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-5
|
|
|
3d81c9 |
- Fix some rpmdiff errors
|
|
|
3d81c9 |
|
|
|
3d81c9 |
* Fri Dec 13 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-4
|
|
|
3d81c9 |
- Remove build artifacts installed with unittests
|
|
|
3d81c9 |
|
|
|
3d81c9 |
* Thu Dec 05 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-3
|
|
|
3d81c9 |
- Add lld-test package
|
|
|
3d81c9 |
|
|
|
3d81c9 |
* Thu Nov 14 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-2
|
|
|
3d81c9 |
- Add explicit lld-libs requires to fix rpmdiff errors
|
|
|
3d81c9 |
|
|
|
3d81c9 |
* Thu Sep 26 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-1
|
|
|
3d81c9 |
- 9.0.0 Release
|
|
|
3d81c9 |
|
|
|
3d81c9 |
* Thu Aug 1 2019 sguelton@redhat.com - 8.0.1-1
|
|
|
3d81c9 |
- 8.0.1 release
|
|
|
3d81c9 |
|
|
|
3d81c9 |
* Mon Jun 17 2019 sguelton@redhat.com - 8.0.1-0.2.rc2
|
|
|
3d81c9 |
- Remove unnecessary threading patch
|
|
|
3d81c9 |
|
|
|
3d81c9 |
* Thu Jun 13 2019 sguelton@redhat.com - 8.0.1-0.1.rc2
|
|
|
3d81c9 |
- 8.0.1rc2 Release
|
|
|
3d81c9 |
|
|
|
3d81c9 |
* Tue Apr 16 2019 sguelton@redhat.com - 8.0.0-1
|
|
|
3d81c9 |
- 8.0.0 Release
|
|
|
3d81c9 |
|
|
|
3d81c9 |
* Mon Jan 14 2019 sguelton@redhat.com - 7.0.1-3
|
|
|
3d81c9 |
- Fix lld + annobin integration & Setup basic CI tests
|
|
|
3d81c9 |
|
|
|
3d81c9 |
* Sat Dec 15 2018 Tom Stellard <tstellar@redhat.com> - 7.0.1-2
|
|
|
3d81c9 |
- Bump required python3-lit version
|
|
|
3d81c9 |
|
|
|
3d81c9 |
* Fri Dec 14 2018 Tom Stellard <tstellar@redhat.com> - 7.0.1-1
|
|
|
3d81c9 |
- 7.0.1-1 Release
|
|
|
3d81c9 |
|
|
|
3d81c9 |
* Mon Dec 10 2018 Tom Stellard <tstellar@redhat.com> - 7.0.1-0.2.rc3
|
|
|
3d81c9 |
- 7.0.1-rc3 Release
|
|
|
3d81c9 |
|
|
|
3d81c9 |
* Tue Nov 27 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-1
|
|
|
3d81c9 |
- 7.0.0 Release
|
|
|
3d81c9 |
|
|
|
3d81c9 |
* Mon Oct 01 2018 Tom Stellard <tstellar@redhat.com> - 6.0.1-2
|
|
|
3d81c9 |
- Drop scl macros
|
|
|
3d81c9 |
|
|
|
3d81c9 |
* Wed Jun 27 2018 Tom Stellard <tstellar@redhat.com> - 6.0.1-1
|
|
|
3d81c9 |
- 6.0.1 Release
|
|
|
3d81c9 |
|
|
|
3d81c9 |
* Fri May 11 2018 Tom Stellard <tstellar@redhat.com> - 6.0.1-0.1.rc1
|
|
|
3d81c9 |
- 6.0.1-rc1 Release
|
|
|
3d81c9 |
|
|
|
3d81c9 |
* Thu Mar 08 2018 Tom Stellard <tstellar@redhat.com> - 6.0.0-1
|
|
|
3d81c9 |
- 6.0.0 Release
|
|
|
3d81c9 |
|
|
|
3d81c9 |
* Tue Feb 13 2018 Tom Stellard <tstellar@redhat.com> - 6.0.0-0.3.rc2
|
|
|
3d81c9 |
- 6.0.0-rc2 Release
|
|
|
3d81c9 |
|
|
|
3d81c9 |
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-0.2.rc1
|
|
|
3d81c9 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
3d81c9 |
|
|
|
3d81c9 |
* Thu Jan 25 2018 Tom Stellard <tstellar@redhat.com> - 6.0.0-0.1.rc1
|
|
|
3d81c9 |
- 6.0.0-rc1 Release
|
|
|
3d81c9 |
|
|
|
3d81c9 |
* Thu Dec 21 2017 Tom Stellard <tstellar@redhat.com> - 5.0.1-1
|
|
|
3d81c9 |
- 5.0.1 Release
|
|
|
3d81c9 |
|
|
|
3d81c9 |
* Mon Sep 11 2017 Tom Stellard <tstellar@redhat.com> - 5.0.0-1
|
|
|
3d81c9 |
- 5.0.0 Release
|
|
|
3d81c9 |
|
|
|
3d81c9 |
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-4
|
|
|
3d81c9 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
|
|
3d81c9 |
|
|
|
3d81c9 |
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-3
|
|
|
3d81c9 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
3d81c9 |
|
|
|
3d81c9 |
* Thu Jul 06 2017 Tom Stellard <tstellar@redhat.com> - 4.0.1-2
|
|
|
3d81c9 |
- Backport r307092
|
|
|
3d81c9 |
|
|
|
3d81c9 |
* Tue Jul 04 2017 Tom Stellard <tstellar@redhat.com> - 4.0.1-1
|
|
|
3d81c9 |
- 4.0.1 Release
|
|
|
3d81c9 |
|
|
|
3d81c9 |
* Tue Jul 04 2017 Tom Stellard <tstellar@redhat.com> - 4.0.0-4
|
|
|
3d81c9 |
- Fix build without llvm-static
|
|
|
3d81c9 |
|
|
|
3d81c9 |
* Wed May 31 2017 Tom Stellard <tstellar@redhat.com> - 4.0.0-3
|
|
|
3d81c9 |
- Remove llvm-static dependency
|
|
|
3d81c9 |
|
|
|
3d81c9 |
* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.0-2
|
|
|
3d81c9 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild
|
|
|
3d81c9 |
|
|
|
3d81c9 |
* Tue Mar 14 2017 Tom Stellard <tstellar@redhat.com> - 4.0.0-1
|
|
|
3d81c9 |
- lld 4.0.0 Final Release
|