]>
Commit | Line | Data |
---|---|---|
1 | Summary: mold: A Modern Linker | |
2 | Name: mold | |
3 | Version: 1.0.1 | |
4 | Release: 1 | |
5 | License: GPL v3+ | |
6 | Group: Development/Libraries | |
7 | Source0: https://github.com/rui314/mold/archive/v%{version}/%{name}-%{version}.tar.gz | |
8 | # Source0-md5: 5e04e600c33762c4e735d7962bac72e7 | |
9 | URL: https://github.com/rui314/mold | |
10 | BuildRequires: libstdc++-devel >= 6:10 | |
11 | BuildRequires: mimalloc-devel >= 1.7 | |
12 | BuildRequires: openssl-devel | |
13 | BuildRequires: tbb-devel >= 2021.3.0 | |
14 | BuildRequires: xxHash-devel | |
15 | BuildRequires: zlib-devel | |
16 | Requires: mimalloc >= 1.7 | |
17 | Requires: tbb >= 2021.3.0 | |
18 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
19 | ||
20 | %description | |
21 | mold is a faster drop-in replacement for existing Unix linkers. It is | |
22 | several times faster than LLVM lld linker, the second-fastest | |
23 | open-source linker which I originally created a few years ago. mold is | |
24 | created for increasing developer productivity by reducing build time | |
25 | especially in rapid debug-edit-rebuild cycles. | |
26 | ||
27 | %prep | |
28 | %setup -q | |
29 | ||
30 | %{__rm} -r third-party/{mimalloc,tbb} | |
31 | ||
32 | %build | |
33 | export CPPFLAGS="%{rpmcppflags}" | |
34 | export CFLAGS="%{rpmcflags}" | |
35 | export CXXFLAGS="%{rpmcxxflags}" | |
36 | export LDFLAGS="%{rpmldflags}" | |
37 | %{__make} \ | |
38 | CC="%{__cc}" \ | |
39 | CXX="%{__cxx}" \ | |
40 | SYSTEM_MIMALLOC=1 \ | |
41 | SYSTEM_TBB=1 \ | |
42 | PREFIX="%{_prefix}" \ | |
43 | BINDIR="%{_bindir}" \ | |
44 | LIBDIR="%{_libdir}" \ | |
45 | MANDIR="%{_mandir}" | |
46 | ||
47 | %install | |
48 | rm -rf $RPM_BUILD_ROOT | |
49 | ||
50 | %{__make} install \ | |
51 | D=$RPM_BUILD_ROOT \ | |
52 | SYSTEM_MIMALLOC=1 \ | |
53 | SYSTEM_TBB=1 \ | |
54 | STRIP=: \ | |
55 | PREFIX="%{_prefix}" \ | |
56 | BINDIR="%{_bindir}" \ | |
57 | LIBDIR="%{_libdir}" \ | |
58 | MANDIR="%{_mandir}" | |
59 | ||
60 | %clean | |
61 | rm -rf $RPM_BUILD_ROOT | |
62 | ||
63 | %files | |
64 | %defattr(644,root,root,755) | |
65 | %doc CONTRIBUTING.md README.md docs/*.md | |
66 | %attr(755,root,root) %{_bindir}/ld.mold | |
67 | %attr(755,root,root) %{_bindir}/ld64.mold | |
68 | %attr(755,root,root) %{_bindir}/mold | |
69 | %dir %{_libdir}/mold | |
70 | %attr(755,root,root) %{_libdir}/mold/mold-wrapper.so | |
71 | %dir %{_libexecdir}/mold | |
72 | %attr(755,root,root) %{_libexecdir}/mold/ld | |
73 | %{_mandir}/man1/mold.1* |