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