]>
Commit | Line | Data |
---|---|---|
a2080a44 JP |
1 | Summary: mold: A Modern Linker |
2 | Name: mold | |
e816c329 | 3 | Version: 1.0.2 |
5c950940 | 4 | Release: 2 |
a2080a44 JP |
5 | License: GPL v3+ |
6 | Group: Development/Libraries | |
7 | Source0: https://github.com/rui314/mold/archive/v%{version}/%{name}-%{version}.tar.gz | |
e816c329 | 8 | # Source0-md5: 6308dd1775808fdcf83538927239ebdb |
a2080a44 JP |
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 | |
a2080a44 JP |
33 | %{__make} \ |
34 | CC="%{__cc}" \ | |
35 | CXX="%{__cxx}" \ | |
5c950940 JP |
36 | CFLAGS="%{rpmcppflags} %{rpmcflags}" \ |
37 | CXXFLAGS="%{rpmcppflags} %{rpmcxxflags}" \ | |
38 | LDFLAGS="%{rpmldflags}" \ | |
a2080a44 JP |
39 | SYSTEM_MIMALLOC=1 \ |
40 | SYSTEM_TBB=1 \ | |
41 | PREFIX="%{_prefix}" \ | |
42 | BINDIR="%{_bindir}" \ | |
43 | LIBDIR="%{_libdir}" \ | |
44 | MANDIR="%{_mandir}" | |
45 | ||
46 | %install | |
47 | rm -rf $RPM_BUILD_ROOT | |
48 | ||
49 | %{__make} install \ | |
50 | D=$RPM_BUILD_ROOT \ | |
51 | SYSTEM_MIMALLOC=1 \ | |
52 | SYSTEM_TBB=1 \ | |
53 | STRIP=: \ | |
54 | PREFIX="%{_prefix}" \ | |
55 | BINDIR="%{_bindir}" \ | |
56 | LIBDIR="%{_libdir}" \ | |
57 | MANDIR="%{_mandir}" | |
58 | ||
59 | %clean | |
60 | rm -rf $RPM_BUILD_ROOT | |
61 | ||
62 | %files | |
63 | %defattr(644,root,root,755) | |
64 | %doc CONTRIBUTING.md README.md docs/*.md | |
65 | %attr(755,root,root) %{_bindir}/ld.mold | |
66 | %attr(755,root,root) %{_bindir}/ld64.mold | |
67 | %attr(755,root,root) %{_bindir}/mold | |
68 | %dir %{_libdir}/mold | |
69 | %attr(755,root,root) %{_libdir}/mold/mold-wrapper.so | |
5178e76b JP |
70 | %dir %{_libexecdir}/mold |
71 | %attr(755,root,root) %{_libexecdir}/mold/ld | |
a2080a44 | 72 | %{_mandir}/man1/mold.1* |