Blame SPECS/lld.spec

0f0410
%bcond_without check
0f0410
0f0410
#global rc_ver 4
0f0410
%global lld_srcdir lld-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src
0f0410
%global baserelease 2
0f0410
%global maj_ver 13
36eb0e
%global min_ver 0
04e441
%global patch_ver 1
074ff8
f79958
# Don't include unittests in automatic generation of provides or requires.
f79958
%global __provides_exclude_from ^%{_libdir}/lld/.*$
f79958
%global __requires_exclude ^libgtest.*$
f79958
f79958
%bcond_with ld_alternative
0d6038
074ff8
Name:		lld
ffa139
Version:	%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}}
0f0410
Release:	%{baserelease}%{?rc_ver:.rc%{rc_ver}}%{?dist}
074ff8
Summary:	The LLVM Linker
074ff8
074ff8
License:	NCSA
074ff8
URL:		http://llvm.org
7d1e81
Source0:	https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}%{?rc_ver:-rc%{rc_ver}}/%{lld_srcdir}.tar.xz
7d1e81
Source1:	https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}%{?rc_ver:-rc%{rc_ver}}/%{lld_srcdir}.tar.xz.sig
ffa139
Source2:	tstellar-gpg-key.asc
7d1e81
Source3:	run-lit-tests
7d1e81
Source4:	lit.lld-test.cfg.py
074ff8
7d1e81
ExcludeArch:	s390x
074ff8
ffa139
Patch0:		0001-PATCH-lld-CMake-Check-for-gtest-headers-even-if-lit..patch
ffa139
ffa139
# Bundle libunwind header need during build for MachO support
ffa139
Patch1:		0002-PATCH-lld-Import-compact_unwind_encoding.h-from-libu.patch
ffa139
0f0410
0d6038
BuildRequires:	gcc
0d6038
BuildRequires:	gcc-c++
0d6038
BuildRequires:	cmake
7d1e81
BuildRequires:	ninja-build
0d6038
BuildRequires:	llvm-devel = %{version}
0d6038
BuildRequires:	llvm-test = %{version}
0d6038
BuildRequires:	ncurses-devel
0d6038
BuildRequires:	zlib-devel
7d1e81
BuildRequires:	python3-devel
074ff8
074ff8
# For make check:
0d6038
BuildRequires:	python3-rpm-macros
0d6038
BuildRequires:	python3-lit
0d6038
BuildRequires:	llvm-googletest = %{version}
074ff8
f79958
%if %{with ld_alternative}
f79958
Requires(post): %{_sbindir}/alternatives
f79958
Requires(preun): %{_sbindir}/alternatives
f79958
%endif
f79958
f79958
Requires: lld-libs = %{version}-%{release}
f79958
074ff8
%description
074ff8
The LLVM project linker.
074ff8
074ff8
%package devel
074ff8
Summary:	Libraries and header files for LLD
7d1e81
Requires: lld-libs%{?_isa} = %{version}-%{release}
7d1e81
# lld tools are referenced in the cmake files, so we need to add lld as a
7d1e81
# dependency.
7d1e81
Requires: %{name}%{?_isa} = %{version}-%{release}
074ff8
074ff8
%description devel
074ff8
This package contains library and header files needed to develop new native
074ff8
programs that use the LLD infrastructure.
074ff8
074ff8
%package libs
074ff8
Summary:	LLD shared libraries
074ff8
074ff8
%description libs
074ff8
Shared libraries for LLD.
074ff8
074ff8
%prep
ffa139
%autosetup -n %{lld_srcdir} -p2
7d1e81
7d1e81
074ff8
%build
074ff8
ffa139
# Disable lto since it causes the COFF/libpath.test lit test to crash.
ffa139
%global _lto_cflags %{nil}
ffa139
ffa139
mkdir -p %{_vpath_builddir}
ffa139
cd %{_vpath_builddir}
074ff8
074ff8
%cmake .. \
7d1e81
	-GNinja \
074ff8
	-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
074ff8
	-DLLVM_DYLIB_COMPONENTS="all" \
7d1e81
	-DCMAKE_SKIP_RPATH:BOOL=ON \
0d6038
	-DPYTHON_EXECUTABLE=%{__python3} \
074ff8
	-DLLVM_INCLUDE_TESTS=ON \
074ff8
	-DLLVM_MAIN_SRC_DIR=%{_datadir}/llvm/src \
074ff8
	-DLLVM_EXTERNAL_LIT=%{_bindir}/lit \
074ff8
	-DLLVM_LIT_ARGS="-sv \
0d6038
	--path %{_libdir}/llvm" \
074ff8
%if 0%{?__isa_bits} == 64
074ff8
	-DLLVM_LIBDIR_SUFFIX=64
074ff8
%else
074ff8
	-DLLVM_LIBDIR_SUFFIX=
074ff8
%endif
074ff8
ffa139
%cmake_build
074ff8
074ff8
%install
f79958
# Install libraries and binaries
074ff8
cd %{_target_platform}
ffa139
ffa139
%cmake_install
ffa139
# This is generated by Patch1 during build and (probably) must be removed afterward
ffa139
rm %{buildroot}%{_includedir}/mach-o/compact_unwind_encoding.h
f79958
f79958
%if %{with ld_alternative}
f79958
# Required when using update-alternatives:
f79958
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Alternatives/
f79958
touch %{buildroot}%{_bindir}/ld
f79958
f79958
%post
f79958
%{_sbindir}/update-alternatives --install %{_bindir}/ld ld %{_bindir}/ld.lld 1
f79958
f79958
%postun
f79958
if [ $1 -eq 0 ] ; then
f79958
  %{_sbindir}/update-alternatives --remove ld %{_bindir}/ld.lld
f79958
fi
f79958
%endif
074ff8
074ff8
%check
0d6038
ffa139
cd %{_vpath_builddir}
ffa139
f79958
# armv7lhl tests disabled because of arm issue, see https://koji.fedoraproject.org/koji/taskinfo?taskID=33660162
f79958
%ifnarch %{arm}
ffa139
%cmake_build --target check-lld
0d6038
%endif
074ff8
0d6038
%ldconfig_scriptlets libs
074ff8
074ff8
%files
7d1e81
%license LICENSE.TXT
f79958
%if %{with ld_alternative}
f79958
%ghost %{_bindir}/ld
f79958
%endif
074ff8
%{_bindir}/lld*
074ff8
%{_bindir}/ld.lld
074ff8
%{_bindir}/ld64.lld
ffa139
%{_bindir}/ld64.lld.darwinnew
0f0410
%{_bindir}/ld64.lld.darwinold
074ff8
%{_bindir}/wasm-ld
074ff8
074ff8
%files devel
074ff8
%{_includedir}/lld
074ff8
%{_libdir}/liblld*.so
7d1e81
%{_libdir}/cmake/lld/
074ff8
074ff8
%files libs
074ff8
%{_libdir}/liblld*.so.*
074ff8
074ff8
%changelog
0f0410
* Thu Feb 03 2022 Tom Stellard <tstellar@redhat.com> - 13.0.1-1
0f0410
- 13.0.1 Release
0f0410
0f0410
* Thu Dec 09 2021 Tom Stellard <tstellar@redhat.com> - 13.0.0-2
0f0410
- Drop lld-test package
0f0410
0f0410
* Fri Oct 15 2021 Tom Stellard <tstellar@redhat.com> - 13.0.0-1
0f0410
- 13.0.0 Release
0f0410
ffa139
* Fri Jul 16 2021 sguelton@redhat.com - 12.0.1-1
ffa139
- 12.0.1 release
ffa139
ffa139
* Thu May 6 2021 sguelton@redhat.com - 12.0.0-1
ffa139
- 12.0.0 release
04e441
7d1e81
* Mon Nov 09 2020 sguelton@redhat.com - 11.0.0-3
7d1e81
- Exclude s390x, see rhbz#1894927
7d1e81
7d1e81
* Thu Oct 29 2020 sguelton@redhat.com - 11.0.0-1
7d1e81
- 11.0.0 final
7d1e81
7d1e81
* Fri Sep 18 2020 sguelton@redhat.com - 11.0.0-0.1.rc2
7d1e81
- 11.0.0-rc2 Release
7d1e81
36eb0e
* Fri Jul 24 2020 sguelton@redhat.com - 10.0.1-1
36eb0e
- 10.0.1 release
36eb0e
36eb0e
* Mon Jul 20 2020 sguelton@redhat.com - 10.0.0-2
36eb0e
- Fix arch-dependent tarball
36eb0e
36eb0e
* Thu Apr 9 2020 sguelton@redhat.com - 10.0.0-1
36eb0e
- 10.0.0 final
36eb0e
f79958
* Thu Dec 19 2019 Tom Stellard <tstellar@redhat.com> -9.0.1-1
f79958
- 9.0.1 Release
f79958
f79958
* Fri Dec 13 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-5
f79958
- Fix some rpmdiff errors
f79958
f79958
* Fri Dec 13 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-4
f79958
- Remove build artifacts installed with unittests
f79958
f79958
* Thu Dec 05 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-3
f79958
- Add lld-test package
f79958
f79958
* Thu Nov 14 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-2
f79958
- Add explicit lld-libs requires to fix rpmdiff errors
f79958
f79958
* Thu Sep 26 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-1
f79958
- 9.0.0 Release
f79958
0d6038
* Thu Aug 1 2019 sguelton@redhat.com - 8.0.1-1
0d6038
- 8.0.1 release
0d6038
0d6038
* Mon Jun 17 2019 sguelton@redhat.com - 8.0.1-0.2.rc2
0d6038
- Remove unnecessary threading patch
0d6038
0d6038
* Thu Jun 13 2019 sguelton@redhat.com - 8.0.1-0.1.rc2
0d6038
- 8.0.1rc2 Release
0d6038
0d6038
* Tue Apr 16 2019 sguelton@redhat.com - 8.0.0-1
0d6038
- 8.0.0 Release
0d6038
074ff8
* Mon Jan 14 2019 sguelton@redhat.com - 7.0.1-3
074ff8
- Fix lld + annobin integration & Setup basic CI tests
074ff8
074ff8
* Sat Dec 15 2018 Tom Stellard <tstellar@redhat.com> - 7.0.1-2
074ff8
- Bump required python3-lit version
074ff8
074ff8
* Fri Dec 14 2018 Tom Stellard <tstellar@redhat.com> - 7.0.1-1
074ff8
- 7.0.1-1 Release
074ff8
074ff8
* Mon Dec 10 2018 Tom Stellard <tstellar@redhat.com> - 7.0.1-0.2.rc3
074ff8
- 7.0.1-rc3 Release
074ff8
074ff8
* Tue Nov 27 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-1
074ff8
- 7.0.0 Release
074ff8
074ff8
* Mon Oct 01 2018 Tom Stellard <tstellar@redhat.com> - 6.0.1-2
074ff8
- Drop scl macros
074ff8
074ff8
* Wed Jun 27 2018 Tom Stellard <tstellar@redhat.com> - 6.0.1-1
074ff8
- 6.0.1 Release
074ff8
074ff8
* Fri May 11 2018 Tom Stellard <tstellar@redhat.com> - 6.0.1-0.1.rc1
074ff8
- 6.0.1-rc1 Release
074ff8
074ff8
* Thu Mar 08 2018 Tom Stellard <tstellar@redhat.com> - 6.0.0-1
074ff8
- 6.0.0 Release
074ff8
074ff8
* Tue Feb 13 2018 Tom Stellard <tstellar@redhat.com> - 6.0.0-0.3.rc2
074ff8
- 6.0.0-rc2 Release
074ff8
074ff8
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-0.2.rc1
074ff8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
074ff8
074ff8
* Thu Jan 25 2018 Tom Stellard <tstellar@redhat.com> - 6.0.0-0.1.rc1
074ff8
- 6.0.0-rc1 Release
074ff8
074ff8
* Thu Dec 21 2017 Tom Stellard <tstellar@redhat.com> - 5.0.1-1
074ff8
- 5.0.1 Release
074ff8
074ff8
* Mon Sep 11 2017 Tom Stellard <tstellar@redhat.com> - 5.0.0-1
074ff8
- 5.0.0 Release
074ff8
074ff8
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-4
074ff8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
074ff8
074ff8
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-3
074ff8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
074ff8
074ff8
* Thu Jul 06 2017 Tom Stellard <tstellar@redhat.com> - 4.0.1-2
074ff8
- Backport r307092
074ff8
074ff8
* Tue Jul 04 2017 Tom Stellard <tstellar@redhat.com> - 4.0.1-1
074ff8
- 4.0.1 Release
074ff8
074ff8
* Tue Jul 04 2017 Tom Stellard <tstellar@redhat.com> - 4.0.0-4
074ff8
- Fix build without llvm-static
074ff8
074ff8
* Wed May 31 2017 Tom Stellard <tstellar@redhat.com> - 4.0.0-3
074ff8
- Remove llvm-static dependency
074ff8
074ff8
* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.0-2
074ff8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild
074ff8
074ff8
* Tue Mar 14 2017 Tom Stellard <tstellar@redhat.com> - 4.0.0-1
074ff8
- lld 4.0.0 Final Release