Blame SPECS/lld.spec

0e46af
%bcond_without check
0e46af
0e46af
#global rc_ver 4
0e46af
%global lld_srcdir lld-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src
fb2d2e
%global baserelease 2
0e46af
%global maj_ver 13
3d81c9
%global min_ver 0
0e46af
%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
69f20e
Version:	%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}}
0e46af
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
69f20e
Source2:	tstellar-gpg-key.asc
df91b0
Source3:	run-lit-tests
df91b0
Source4:	lit.lld-test.cfg.py
3d81c9
5a4962
ExcludeArch:	s390x
5a4962
69f20e
Patch0:		0001-PATCH-lld-CMake-Check-for-gtest-headers-even-if-lit..patch
69f20e
69f20e
# Bundle libunwind header need during build for MachO support
69f20e
Patch1:		0002-PATCH-lld-Import-compact_unwind_encoding.h-from-libu.patch
69f20e
0e46af
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
%prep
69f20e
%autosetup -n %{lld_srcdir} -p2
df91b0
df91b0
3d81c9
%build
3d81c9
69f20e
# Disable lto since it causes the COFF/libpath.test lit test to crash.
69f20e
%global _lto_cflags %{nil}
69f20e
69f20e
mkdir -p %{_vpath_builddir}
69f20e
cd %{_vpath_builddir}
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
69f20e
%cmake_build
3d81c9
3d81c9
%install
3d81c9
# Install libraries and binaries
3d81c9
cd %{_target_platform}
69f20e
69f20e
%cmake_install
69f20e
# This is generated by Patch1 during build and (probably) must be removed afterward
69f20e
rm %{buildroot}%{_includedir}/mach-o/compact_unwind_encoding.h
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
69f20e
cd %{_vpath_builddir}
69f20e
3d81c9
# armv7lhl tests disabled because of arm issue, see https://koji.fedoraproject.org/koji/taskinfo?taskID=33660162
3d81c9
%ifnarch %{arm}
69f20e
%cmake_build --target 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
69f20e
%{_bindir}/ld64.lld.darwinnew
0e46af
%{_bindir}/ld64.lld.darwinold
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
%changelog
fb2d2e
* Thu Dec 09 2021 Tom Stellard <tstellar@redhat.com> - 13.0.0-2
fb2d2e
- Drop lld-test package
fb2d2e
0e46af
* Fri Oct 15 2021 Tom Stellard <tstellar@redhat.com> - 13.0.0-1
0e46af
- 13.0.0 Release
0e46af
822799
* Fri Jul 16 2021 sguelton@redhat.com - 12.0.1-1
822799
- 12.0.1 release
822799
69f20e
* Thu May 6 2021 sguelton@redhat.com - 12.0.0-1
69f20e
- 12.0.0 release
69f20e
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