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