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