f642d3d
#%%global rc_ver 4
9ab38c3
%global lld_srcdir lld-%{version}%{?rc_ver:rc%{rc_ver}}.src
9ab38c3
098c352
Name:		lld
9ade981
Version:	8.0.0
9ade981
Release:	1%{?rc_ver:.rc%{rc_ver}}%{?dist}
098c352
Summary:	The LLVM Linker
098c352
098c352
License:	NCSA
098c352
URL:		http://llvm.org
9ab38c3
Source0:	http://%{?rc_ver:pre}releases.llvm.org/%{version}/%{?rc_ver:rc%{rc_ver}}/%{lld_srcdir}.tar.xz
098c352
059c998
Patch0:		0001-CMake-Check-for-gtest-headers-even-if-lit.py-is-not-.patch
059c998
Patch1:		0001-lld-Prefer-using-the-newest-installed-python-version.patch
29c928e
Patch2:		0001-Partial-support-of-SHT_GROUP-without-flag.patch
059c998
3f05fc2
BuildRequires:	gcc
3f05fc2
BuildRequires:	gcc-c++
3f05fc2
BuildRequires:	cmake
3f05fc2
BuildRequires:	llvm-devel = %{version}
3f05fc2
BuildRequires:	ncurses-devel
3f05fc2
BuildRequires:	zlib-devel
3f05fc2
BuildRequires:	chrpath
098c352
059c998
# For make check:
4928a61
BuildRequires:	python3-rpm-macros
c6cdb09
BuildRequires:	python3-lit
4928a61
BuildRequires:	llvm-googletest = %{version}
059c998
098c352
%description
098c352
The LLVM project linker.
098c352
098c352
%package devel
098c352
Summary:	Libraries and header files for LLD
098c352
098c352
%description devel
098c352
This package contains library and header files needed to develop new native
098c352
programs that use the LLD infrastructure.
098c352
098c352
%package libs
098c352
Summary:	LLD shared libraries
098c352
098c352
%description libs
098c352
Shared libraries for LLD.
098c352
098c352
%prep
da75323
%autosetup -n %{name}-%{version}%{?rc_ver:rc%{rc_ver}}.src -p1
098c352
098c352
%build
098c352
098c352
mkdir %{_target_platform}
098c352
cd %{_target_platform}
098c352
098c352
%cmake .. \
098c352
	-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
9f38435
	-DLLVM_DYLIB_COMPONENTS="all" \
4928a61
	-DPYTHON_EXECUTABLE=%{__python3} \
059c998
	-DLLVM_INCLUDE_TESTS=ON \
059c998
	-DLLVM_MAIN_SRC_DIR=%{_datadir}/llvm/src \
059c998
	-DLLVM_EXTERNAL_LIT=%{_bindir}/lit \
9ade981
	-DLLVM_TABLEGEN_EXE=%{_libdir}/llvm/llvm-tblgen\
059c998
	-DLLVM_LIT_ARGS="-sv \
3f05fc2
	-DFileCheck=%{_libdir}/llvm/FileCheck \
3f05fc2
	-Dcount=%{_libdir}/llvm/count \
3f05fc2
	-Dnot=%{_libdir}/llvm/not \
3f05fc2
	--path %{_libdir}/llvm" \
098c352
%if 0%{?__isa_bits} == 64
098c352
	-DLLVM_LIBDIR_SUFFIX=64
098c352
%else
098c352
	-DLLVM_LIBDIR_SUFFIX=
098c352
%endif
098c352
098c352
%make_build
098c352
098c352
%install
098c352
cd %{_target_platform}
098c352
%make_install
098c352
098c352
# Remove rpath
098c352
chrpath --delete %{buildroot}%{_bindir}/*
098c352
chrpath --delete %{buildroot}%{_libdir}/*.so*
098c352
9ade981
for target in ld.lld ld64.lld wasm-ld
9ade981
do
9ade981
    ln -s lld %{buildroot}%{_bindir}/${target}
9ade981
done
9ade981
9ade981
098c352
%check
059c998
make -C %{_target_platform} %{?_smp_mflags} check-lld
098c352
cde0133
%ldconfig_scriptlets libs
098c352
098c352
%files
098c352
%{_bindir}/lld*
098c352
%{_bindir}/ld.lld
da75323
%{_bindir}/ld64.lld
da75323
%{_bindir}/wasm-ld
098c352
098c352
%files devel
098c352
%{_includedir}/lld
098c352
%{_libdir}/liblld*.so
098c352
098c352
%files libs
098c352
%{_libdir}/liblld*.so.*
098c352
098c352
%changelog
f642d3d
* Wed Mar 20 2019 sguelton@redhat.com - 8.0.0-1
f642d3d
- 8.0.0 final
f642d3d
9ade981
* Mon Feb 11 2019 sguelton@redhat.com - 8.0.0-1.rc1
9ade981
- 8.0.0 Release candidate 1
9ade981
a6ae391
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 7.0.1-3.1
a6ae391
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
a6ae391
29c928e
* Mon Jan 14 2019 sguelton@redhat.com - 7.0.1-3
29c928e
- Fix lld + annobin integration & Setup basic CI tests
29c928e
c6cdb09
* Mon Dec 17 2018 sguelton@redhat.com - 7.0.1-2
c6cdb09
- Update lit dependency
c6cdb09
4928a61
* Mon Dec 17 2018 sguelton@redhat.com - 7.0.1-1
4928a61
- 7.0.1 Release
4928a61
3f05fc2
* Tue Dec 04 2018 sguelton@redhat.com - 7.0.0-2
3f05fc2
- Ensure rpmlint passes on specfile
3f05fc2
a0e4033
* Mon Sep 24 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-1
a0e4033
- 7.0.1 Release
a0e4033
a46aea7
* Tue Sep 11 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.4.rc3
a46aea7
- 7.0.0-rc3 Release
a46aea7
4a0d79c
* Fri Aug 31 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.3.rc2
4a0d79c
- 7.0.0-rc2 Release
4a0d79c
059c998
* Thu Aug 30 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.2.rc1
059c998
- Enable make check
059c998
9ab38c3
* Mon Aug 13 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.1.rc1
9ab38c3
- 7.0.0-rc1 Release
9ab38c3
6e3a5ee
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.1-2
6e3a5ee
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
6e3a5ee
2a864b9
* Wed Jun 27 2018 Tom Stellard <tstellar@redhat.com> - 6.0.1-1
2a864b9
- 6.0.1 Release
2a864b9
ea99a80
* Fri May 11 2018 Tom Stellard <tstellar@redhat.com> - 6.0.1-0.1.rc1
ea99a80
- 6.0.1-rc1 Release
ea99a80
082405c
* Thu Mar 08 2018 Tom Stellard <tstellar@redhat.com> - 6.0.0-1
082405c
- 6.0.0 Release
082405c
de435f3
* Tue Feb 13 2018 Tom Stellard <tstellar@redhat.com> - 6.0.0-0.3.rc2
de435f3
- 6.0.0-rc2 Release
de435f3
948e525
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-0.2.rc1
948e525
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
948e525
da75323
* Thu Jan 25 2018 Tom Stellard <tstellar@redhat.com> - 6.0.0-0.1.rc1
da75323
- 6.0.0-rc1 Release
da75323
cbfdd41
* Thu Dec 21 2017 Tom Stellard <tstellar@redhat.com> - 5.0.1-1
cbfdd41
- 5.0.1 Release
cbfdd41
25acfbc
* Mon Sep 11 2017 Tom Stellard <tstellar@redhat.com> - 5.0.0-1
25acfbc
- 5.0.0 Release
25acfbc
dcb3503
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-4
dcb3503
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
dcb3503
e64615e
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-3
e64615e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
e64615e
4f2676b
* Thu Jul 06 2017 Tom Stellard <tstellar@redhat.com> - 4.0.1-2
4f2676b
- Backport r307092
4f2676b
a407b06
* Tue Jul 04 2017 Tom Stellard <tstellar@redhat.com> - 4.0.1-1
a407b06
- 4.0.1 Release
a407b06
9f38435
* Tue Jul 04 2017 Tom Stellard <tstellar@redhat.com> - 4.0.0-4
9f38435
- Fix build without llvm-static
9f38435
d5aeb58
* Wed May 31 2017 Tom Stellard <tstellar@redhat.com> - 4.0.0-3
d5aeb58
- Remove llvm-static dependency
d5aeb58
59978ab
* Mon May 15 2017 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0.0-2
59978ab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_27_Mass_Rebuild
59978ab
098c352
* Tue Mar 14 2017 Tom Stellard <tstellar@redhat.com> - 4.0.0-1
098c352
- lld 4.0.0 Final Release