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