Blame SPECS/lld.spec

3cc464
%global toolchain clang
16e888
%bcond_without check
16e888
16e888
%global lld_srcdir lld-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src
3cc464
%global maj_ver 15
cac39b
%global min_ver 0
3cc464
%global patch_ver 7
cac39b
3cc464
%global pkg_name lld
3cc464
%global install_prefix /usr
3cc464
%global install_includedir %{_includedir}
3cc464
%global install_libdir %{_libdir}
cac39b
3cc464
Name:		%{pkg_name}
cac39b
Version:	%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}}
3cc464
Release:	4%{?dist}
cac39b
Summary:	The LLVM Linker
cac39b
cac39b
License:	NCSA
cac39b
URL:		http://llvm.org
3cc464
Source0:	https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{lld_srcdir}.tar.xz
3cc464
Source1:	https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{lld_srcdir}.tar.xz.sig
3cc464
Source2:	release-keys.asc
cac39b
cac39b
ExcludeArch:	s390x
cac39b
cac39b
Patch0:		0001-PATCH-lld-CMake-Check-for-gtest-headers-even-if-lit..patch
cac39b
cac39b
# Bundle libunwind header need during build for MachO support
cac39b
Patch1:		0002-PATCH-lld-Import-compact_unwind_encoding.h-from-libu.patch
cac39b
3cc464
BuildRequires:	clang
cac39b
BuildRequires:	cmake
cac39b
BuildRequires:	ninja-build
cac39b
BuildRequires:	llvm-devel = %{version}
cac39b
BuildRequires:	llvm-test = %{version}
3cc464
BuildRequires:	llvm-googletest = %{version}
cac39b
BuildRequires:	ncurses-devel
cac39b
BuildRequires:	zlib-devel
cac39b
cac39b
# For make check:
cac39b
BuildRequires:	python3-rpm-macros
cac39b
BuildRequires:	python3-lit
3cc464
cac39b
cac39b
# For gpg source verification
cac39b
BuildRequires:	gnupg2
cac39b
cac39b
Requires(post): %{_sbindir}/update-alternatives
cac39b
Requires(preun): %{_sbindir}/update-alternatives
cac39b
3cc464
Requires: %{name}-libs = %{version}-%{release}
3cc464
3cc464
Obsoletes: lld-test < 15.0.7
cac39b
cac39b
%description
cac39b
The LLVM project linker.
cac39b
cac39b
%package devel
cac39b
Summary:	Libraries and header files for LLD
3cc464
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
cac39b
# lld tools are referenced in the cmake files, so we need to add lld as a
cac39b
# dependency.
cac39b
Requires: %{name}%{?_isa} = %{version}-%{release}
cac39b
cac39b
%description devel
cac39b
This package contains library and header files needed to develop new native
cac39b
programs that use the LLD infrastructure.
cac39b
cac39b
%package libs
cac39b
Summary:	LLD shared libraries
cac39b
cac39b
%description libs
cac39b
Shared libraries for LLD.
cac39b
cac39b
cac39b
%prep
cac39b
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
cac39b
%autosetup -n %{lld_srcdir} -p2
cac39b
cac39b
cac39b
%build
cac39b
cac39b
# Disable lto since it causes the COFF/libpath.test lit test to crash.
cac39b
%global _lto_cflags %{nil}
cac39b
cac39b
%cmake \
cac39b
	-GNinja \
3cc464
	-DCMAKE_BUILD_TYPE=RelWithDebInfo \
3cc464
	-DCMAKE_INSTALL_PREFIX=%{install_prefix} \
cac39b
	-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
cac39b
	-DLLVM_DYLIB_COMPONENTS="all" \
cac39b
	-DCMAKE_SKIP_RPATH:BOOL=ON \
cac39b
	-DPYTHON_EXECUTABLE=%{__python3} \
cac39b
	-DLLVM_INCLUDE_TESTS=ON \
cac39b
	-DLLVM_EXTERNAL_LIT=%{_bindir}/lit \
cac39b
	-DLLVM_LIT_ARGS="-sv \
3cc464
	--path %{install_libdir}/llvm" \
cac39b
%if 0%{?__isa_bits} == 64
3cc464
	-DLLVM_LIBDIR_SUFFIX=64 \
cac39b
%else
3cc464
	-DLLVM_LIBDIR_SUFFIX= \
cac39b
%endif
3cc464
	-DLLVM_MAIN_SRC_DIR=%{_datadir}/llvm/src
cac39b
cac39b
%cmake_build
cac39b
cac39b
%install
cac39b
cac39b
# Install libraries and binaries
cac39b
%cmake_install
cac39b
cac39b
# This is generated by Patch1 during build and (probably) must be removed afterward
3cc464
rm %{buildroot}%{install_includedir}/mach-o/compact_unwind_encoding.h
cac39b
cac39b
# Required when using update-alternatives:
cac39b
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Alternatives/
cac39b
touch %{buildroot}%{_bindir}/ld
cac39b
cac39b
%post
cac39b
%{_sbindir}/update-alternatives --install %{_bindir}/ld ld %{_bindir}/ld.lld 1
cac39b
cac39b
%postun
cac39b
if [ $1 -eq 0 ] ; then
cac39b
  %{_sbindir}/update-alternatives --remove ld %{_bindir}/ld.lld
cac39b
fi
cac39b
cac39b
%check
cac39b
16e888
%if %{with check}
cac39b
%cmake_build --target check-lld
cac39b
%endif
cac39b
cac39b
%ldconfig_scriptlets libs
cac39b
cac39b
%files
cac39b
%license LICENSE.TXT
cac39b
%ghost %{_bindir}/ld
cac39b
%{_bindir}/lld*
cac39b
%{_bindir}/ld.lld
cac39b
%{_bindir}/ld64.lld
cac39b
%{_bindir}/wasm-ld
cac39b
cac39b
%files devel
3cc464
%{install_includedir}/lld
3cc464
%{install_libdir}/liblld*.so
3cc464
%{install_libdir}/cmake/lld/
cac39b
cac39b
%files libs
3cc464
%{install_libdir}/liblld*.so.*
cac39b
cac39b
cac39b
%changelog
3cc464
* Tue Jan 31 2023 Konrad Kleine <kkleine@redhat.com> - 15.0.7-4
3cc464
- Fixup for obsoleting lld-test < 15.0.7
3cc464
3cc464
* Mon Jan 30 2023 Konrad Kleine <kkleine@redhat.com> - 15.0.7-3
3cc464
- Obsolete lld-test < 15.0.7
3cc464
3cc464
* Mon Jan 16 2023 Konrad Kleine <kkleine@redhat.com> - 15.0.7-2
3cc464
- Update to LLVM 15.0.7
3cc464
3cc464
* Fri Dec 09 2022 Konrad Kleine <kkleine@redhat.com> - 15.0.6-1
3cc464
- Update to LLVM 15.0.6
3cc464
3cc464
* Tue Oct 25 2022 Konrad Kleine <kkleine@redhat.com> - 15.0.1-2
3cc464
- Remove lld-test package
3cc464
3cc464
* Thu Sep 29 2022 Konrad Kleine <kkleine@redhat.com> - 15.0.1-1
3cc464
- 15.0.1 Release
3cc464
e67e8f
* Wed Jul 20 2022 Timm Bäder <tbaeder@redhat.com> - 14.0.6-1
e67e8f
- 14.0.6 Release
e67e8f
e67e8f
* Wed Jun 22 2022 Timm Bäder <tbaeder@redhat.com> - 14.0.5-1
e67e8f
- 14.0.5 Release
e67e8f
e67e8f
* Fri May 06 2022 Timm Bäder <tbaeder@redhat.com> - 14.0.0-2
e67e8f
- Backport ignoring --no-add-needed
e67e8f
e67e8f
* Mon Apr 25 2022 Timm Bäder <tbaeder@redhat.com> - 14.0.0-1
e67e8f
- 14.0.0 Release
e67e8f
70a872
* Thu Feb 03 2022 Tom Stellard <tstellar@redhat.com> - 13.0.1-1
70a872
- 13.0.1 Release
70a872
16e888
* Tue Oct 12 2021 Timm Bäder <tbaeder@redhat.com> - 13.0.0-1
16e888
- Release 13.0.0
16e888
cac39b
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 12.0.1-2
cac39b
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
cac39b
  Related: rhbz#1991688
cac39b
16e888
* Tue Jul 13 2021 Tom Stellard <tstellar@redhat.com> -12.0.1-1
cac39b
- 12.0.1 Release
cac39b
cac39b
* Fri Apr 16 2021 Tom Stellard <tstellar@redhat.com> - 12.0.0-1
cac39b
- 12.0.0 Release
cac39b
cac39b
* Thu Apr 08 2021 sguelton@redhat.com - 12.0.0-0.8.rc5
cac39b
- New upstream release candidate
cac39b
cac39b
* Wed Apr 07 2021 Tom Stellard <tstellar@redhat.com> - 12.0.0-0.7.rc4
cac39b
- Set executable permissions on run-lit-tests
cac39b
cac39b
* Fri Apr 02 2021 sguelton@redhat.com - 12.0.0-0.6.rc4
cac39b
- New upstream release candidate
cac39b
cac39b
* Wed Mar 31 2021 Jonathan Wakely <jwakely@redhat.com> - 12.0.0-0.5.rc3
cac39b
- Rebuilt for removed libstdc++ symbols (#1937698)
cac39b
cac39b
* Thu Mar 11 2021 sguelton@redhat.com - 12.0.0-0.4.rc3
cac39b
- LLVM 12.0.0 rc3
cac39b
cac39b
* Wed Mar 10 2021 sguelton@redhat.com - 12.0.0-0.3.rc2
cac39b
- rebuilt
cac39b
cac39b
* Wed Feb 24 2021 sguelton@redhat.com - 12.0.0-0.2.rc2
cac39b
- llvm 12.0.0-rc2 release
cac39b
cac39b
* Tue Feb 16 2021 sguelton@redhat.com - 12.0.0-0.1.rc1
cac39b
- llvm 12.0.0-rc1 release
cac39b
cac39b
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 11.1.0-0.3.rc2
cac39b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
cac39b
cac39b
* Fri Jan 22 2021 Serge Guelton - 11.1.0-0.2.rc2
cac39b
- llvm 11.1.0-rc2 release
cac39b
cac39b
* Thu Jan 14 2021 Serge Guelton - 11.1.0-0.1.rc1
cac39b
- 11.1.0-rc1 release
cac39b
cac39b
* Wed Jan 06 2021 Serge Guelton - 11.0.1-3
cac39b
- LLVM 11.0.1 final
cac39b
cac39b
* Tue Dec 22 2020 sguelton@redhat.com - 11.0.1-2.rc2
cac39b
- llvm 11.0.1-rc2
cac39b
cac39b
* Tue Dec 01 2020 sguelton@redhat.com - 11.0.1-1.rc1
cac39b
- llvm 11.0.1-rc1
cac39b
cac39b
* Thu Nov 12 2020 sguelton@redhat.com - 11.0.0-3
cac39b
- Exclude s390x, unsupported upstream
cac39b
cac39b
* Mon Oct 19 2020 sguelton@redhat.com - 11.0.0-2
cac39b
- Rebuilt with all gating tests on
cac39b
cac39b
* Thu Oct 15 2020 sguelton@redhat.com - 11.0.0-1
cac39b
- Fix NVR
cac39b
cac39b
* Mon Oct 12 2020 sguelton@redhat.com - 11.0.0-0.6
cac39b
- llvm 11.0.0 - final release
cac39b
cac39b
* Thu Oct 08 2020 sguelton@redhat.com - 11.0.0-0.5.rc6
cac39b
- 11.0.0-rc6
cac39b
cac39b
* Wed Oct 07 2020 sguelton@redhat.com - 11.0.0-0.4.rc5
cac39b
- Update CI tests
cac39b
cac39b
* Fri Oct 02 2020 sguelton@redhat.com - 11.0.0-0.3.rc5
cac39b
- 11.0.0-rc5 Release
cac39b
cac39b
* Sun Sep 27 2020 sguelton@redhat.com - 11.0.0-0.2.rc3
cac39b
- Fix NVR
cac39b
cac39b
* Thu Sep 24 2020 sguelton@redhat.com - 11.0.0-0.1.rc3
cac39b
- 11.0.0-rc3 Release
cac39b
cac39b
* Tue Sep 01 2020 sguelton@redhat.com - 11.0.0-0.1.rc2
cac39b
- 11.0.0-rc2 Release
cac39b
cac39b
* Mon Aug 10 2020 Tom Stellard <tstellar@redhat.com> - 11.0.0-0.1.rc1
cac39b
- 11.0.0-rc1 Release
cac39b
cac39b
* Mon Aug 10 2020 sguelton@redhat.com - 10.0.0-7
cac39b
- use %%license macro
cac39b
cac39b
* Mon Aug 10 2020 Tom Stellard <tstellar@redhat.com> - 10.0.0-6
cac39b
- Disable LTO
cac39b
cac39b
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 10.0.0-5
cac39b
- Second attempt - Rebuilt for
cac39b
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
cac39b
cac39b
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 10.0.0-4
cac39b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
cac39b
cac39b
* Mon Jul 20 2020 sguelton@redhat.com - 10.0.0-3
cac39b
- Use generic cmake macros
cac39b
- Use Ninja as build system
cac39b
- Remove chrpath dependency
cac39b
cac39b
* Fri Jul 17 2020 sguelton@redhat.com - 10.0.0-2
cac39b
- Make test archive arch-independent
cac39b
cac39b
* Mon Mar 30 2020 sguelton@redhat.com - 10.0.0-1
cac39b
- 10.0.0 final
cac39b
cac39b
* Wed Mar 25 2020 sguelton@redhat.com - 10.0.0-0.6.rc6
cac39b
- 10.0.0 rc6
cac39b
cac39b
* Fri Mar 20 2020 sguelton@redhat.com - 10.0.0-0.5.rc5
cac39b
- 10.0.0 rc5
cac39b
cac39b
* Sun Mar 15 2020 sguelton@redhat.com - 10.0.0-0.4.rc4
cac39b
- 10.0.0 rc4
cac39b
cac39b
* Thu Mar 05 2020 sguelton@redhat.com - 10.0.0-0.3.rc3
cac39b
- 10.0.0 rc3
cac39b
cac39b
* Fri Feb 14 2020 sguelton@redhat.com - 10.0.0-0.2.rc2
cac39b
- 10.0.0 rc2
cac39b
cac39b
* Fri Jan 31 2020 sguelton@redhat.com - 10.0.0-0.1.rc1
cac39b
- 10.0.0 rc1
cac39b
cac39b
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 9.0.1-2
cac39b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
cac39b
cac39b
* Thu Dec 19 2019 Tom Stellard <tstellar@redhat.com> -9.0.1-1
cac39b
- 9.0.1 Release
cac39b
cac39b
* Sat Dec 14 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-6
cac39b
- Fix some rpmdiff errors
cac39b
cac39b
* Fri Dec 13 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-5
cac39b
- Remove build artifacts installed with unittests
cac39b
cac39b
* Thu Dec 05 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-4
cac39b
- Enable GPG-based source file verification
cac39b
cac39b
* Thu Dec 05 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-3
cac39b
- Add lld-test package
cac39b
cac39b
* Thu Nov 14 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-2
cac39b
- Add explicit lld-libs requires to fix rpmdiff errors
cac39b
cac39b
* Thu Sep 19 2019 Tom Stellard <tstellar@redhat.com> -9.0.0-1
cac39b
- 9.0.0 Release
cac39b
cac39b
* Thu Aug 22 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-0.1.rc3
cac39b
- 9.0.0-rc3 Release
cac39b
cac39b
* Tue Aug 20 2019 Tom Stellard <tstellar@redhat.com> - 8.0.0-3
cac39b
- touch /usr/bin/ld as required by the packaging guidelines for
cac39b
  update-alternatives
cac39b
cac39b
* Tue Aug 13 2019 Tom Stellard <tstellar@redhat.com> - 8.0.0-2
cac39b
- Add update-alternative for ld
cac39b
cac39b
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.0-1.1
cac39b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
cac39b
cac39b
* Wed Mar 20 2019 sguelton@redhat.com - 8.0.0-1
cac39b
- 8.0.0 final
cac39b
cac39b
* Tue Mar 12 2019 sguelton@redhat.com - 8.0.0-0.4.rc4
cac39b
- 8.0.0 Release candidate 4
cac39b
cac39b
* Tue Mar 5 2019 sguelton@redhat.com - 8.0.0-0.4.rc3
cac39b
- Cleanup specfile after llvm specfile update
cac39b
cac39b
* Mon Mar 4 2019 sguelton@redhat.com - 8.0.0-0.3.rc3
cac39b
- 8.0.0 Release candidate 3
cac39b
cac39b
* Fri Feb 22 2019 sguelton@redhat.com - 8.0.0-0.2.rc2
cac39b
- 8.0.0 Release candidate 2
cac39b
cac39b
* Mon Feb 11 2019 sguelton@redhat.com - 8.0.0-0.1.rc1
cac39b
- 8.0.0 Release candidate 1
cac39b
cac39b
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 7.0.1-3.1
cac39b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
cac39b
cac39b
* Mon Jan 14 2019 sguelton@redhat.com - 7.0.1-3
cac39b
- Fix lld + annobin integration & Setup basic CI tests
cac39b
cac39b
* Mon Dec 17 2018 sguelton@redhat.com - 7.0.1-2
cac39b
- Update lit dependency
cac39b
cac39b
* Mon Dec 17 2018 sguelton@redhat.com - 7.0.1-1
cac39b
- 7.0.1 Release
cac39b
cac39b
* Tue Dec 04 2018 sguelton@redhat.com - 7.0.0-2
cac39b
- Ensure rpmlint passes on specfile
cac39b
cac39b
* Mon Sep 24 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-1
cac39b
- 7.0.1 Release
cac39b
cac39b
* Tue Sep 11 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.4.rc3
cac39b
- 7.0.0-rc3 Release
cac39b
cac39b
* Fri Aug 31 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.3.rc2
cac39b
- 7.0.0-rc2 Release
cac39b
cac39b
* Thu Aug 30 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.2.rc1
cac39b
- Enable make check
cac39b
cac39b
* Mon Aug 13 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.1.rc1
cac39b
- 7.0.0-rc1 Release
cac39b
cac39b
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.1-2
cac39b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
cac39b
cac39b
* Wed Jun 27 2018 Tom Stellard <tstellar@redhat.com> - 6.0.1-1
cac39b
- 6.0.1 Release
cac39b
cac39b
* Fri May 11 2018 Tom Stellard <tstellar@redhat.com> - 6.0.1-0.1.rc1
cac39b
- 6.0.1-rc1 Release
cac39b
cac39b
* Thu Mar 08 2018 Tom Stellard <tstellar@redhat.com> - 6.0.0-1
cac39b
- 6.0.0 Release
cac39b
cac39b
* Tue Feb 13 2018 Tom Stellard <tstellar@redhat.com> - 6.0.0-0.3.rc2
cac39b
- 6.0.0-rc2 Release
cac39b
cac39b
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-0.2.rc1
cac39b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
cac39b
cac39b
* Thu Jan 25 2018 Tom Stellard <tstellar@redhat.com> - 6.0.0-0.1.rc1
cac39b
- 6.0.0-rc1 Release
cac39b
cac39b
* Thu Dec 21 2017 Tom Stellard <tstellar@redhat.com> - 5.0.1-1
cac39b
- 5.0.1 Release
cac39b
cac39b
* Mon Sep 11 2017 Tom Stellard <tstellar@redhat.com> - 5.0.0-1
cac39b
- 5.0.0 Release
cac39b
cac39b
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-4
cac39b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
cac39b
cac39b
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-3
cac39b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
cac39b
cac39b
* Thu Jul 06 2017 Tom Stellard <tstellar@redhat.com> - 4.0.1-2
cac39b
- Backport r307092
cac39b
cac39b
* Tue Jul 04 2017 Tom Stellard <tstellar@redhat.com> - 4.0.1-1
cac39b
- 4.0.1 Release
cac39b
cac39b
* Tue Jul 04 2017 Tom Stellard <tstellar@redhat.com> - 4.0.0-4
cac39b
- Fix build without llvm-static
cac39b
cac39b
* Wed May 31 2017 Tom Stellard <tstellar@redhat.com> - 4.0.0-3
cac39b
- Remove llvm-static dependency
cac39b
cac39b
* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.0-2
cac39b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild
cac39b
cac39b
* Tue Mar 14 2017 Tom Stellard <tstellar@redhat.com> - 4.0.0-1
cac39b
- lld 4.0.0 Final Release