]> git.pld-linux.org Git - packages/mold.git/blame - mold.spec
up to 1.5.1
[packages/mold.git] / mold.spec
CommitLineData
b5cd69c6
JP
1#
2# Conditional build:
3%bcond_without tests # build without tests
4
a2080a44
JP
5Summary: mold: A Modern Linker
6Name: mold
309afd13 7Version: 1.5.1
a32f40a2 8Release: 1
a2080a44
JP
9License: GPL v3+
10Group: Development/Libraries
11Source0: https://github.com/rui314/mold/archive/v%{version}/%{name}-%{version}.tar.gz
309afd13 12# Source0-md5: a81cc2431ab795bc2afe7401d9c0483e
ffeb613b 13Patch0: absolute-install-paths.patch
a2080a44 14URL: https://github.com/rui314/mold
ffeb613b 15BuildRequires: cmake >= 3.13
b5cd69c6 16%{?with_tests:BuildRequires: glibc-static}
4f192f39
JP
17%ifarch %{armv6} riscv64
18BuildRequires: libatomic-devel
19%endif
a2080a44 20BuildRequires: libstdc++-devel >= 6:10
b5cd69c6 21%{?with_tests:BuildRequires: libstdc++-static >= 6:10}
a2080a44
JP
22BuildRequires: mimalloc-devel >= 1.7
23BuildRequires: openssl-devel
4f192f39 24BuildRequires: rpmbuild(macros) >= 2.007
a2080a44 25BuildRequires: tbb-devel >= 2021.3.0
a2080a44 26BuildRequires: zlib-devel
ffeb613b 27BuildRequires: zstd-devel
a2080a44
JP
28Requires: mimalloc >= 1.7
29Requires: tbb >= 2021.3.0
ffeb613b 30ExclusiveArch: %{ix86} %{x8664} %{arm} aarch64 ppc64le riscv64 sparc64
a2080a44
JP
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33%description
34mold is a faster drop-in replacement for existing Unix linkers. It is
35several times faster than LLVM lld linker, the second-fastest
36open-source linker which I originally created a few years ago. mold is
37created for increasing developer productivity by reducing build time
38especially in rapid debug-edit-rebuild cycles.
39
40%prep
41%setup -q
ffeb613b 42%patch0 -p1
a2080a44
JP
43
44%{__rm} -r third-party/{mimalloc,tbb}
45
46%build
ffeb613b
JP
47%cmake -B build \
48 %{cmake_on_off tests BUILD_TESTING} \
49 -DMOLD_USE_MIMALLOC:BOOL=ON \
50 -DMOLD_USE_SYSTEM_MIMALLOC:BOOL=ON \
51 -DMOLD_USE_SYSTEM_TBB:BOOL=ON
52
53%{__make} -C build
a2080a44 54
b5cd69c6 55%if %{with tests}
ffeb613b 56%{__make} -C build test
b5cd69c6
JP
57%endif
58
a2080a44
JP
59%install
60rm -rf $RPM_BUILD_ROOT
61
ffeb613b
JP
62%{__make} -C build install \
63 DESTDIR=$RPM_BUILD_ROOT
a2080a44
JP
64
65%clean
66rm -rf $RPM_BUILD_ROOT
67
68%files
69%defattr(644,root,root,755)
70%doc CONTRIBUTING.md README.md docs/*.md
71%attr(755,root,root) %{_bindir}/ld.mold
72%attr(755,root,root) %{_bindir}/ld64.mold
73%attr(755,root,root) %{_bindir}/mold
74%dir %{_libdir}/mold
75%attr(755,root,root) %{_libdir}/mold/mold-wrapper.so
5178e76b
JP
76%dir %{_libexecdir}/mold
77%attr(755,root,root) %{_libexecdir}/mold/ld
a2080a44 78%{_mandir}/man1/mold.1*
a32f40a2 79%{_mandir}/man1/ld.mold.1*
This page took 0.483209 seconds and 4 git commands to generate.