]> git.pld-linux.org Git - packages/mold.git/blob - mold.spec
f6ea147ba495dfaf63e943355668308ad5ba9d96
[packages/mold.git] / mold.spec
1 Summary:        mold: A Modern Linker
2 Name:           mold
3 Version:        1.2.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:  6e9dba635bd3ed1d39a8fe6411a2005e
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:  pkgconfig
14 BuildRequires:  tbb-devel >= 2021.3.0
15 BuildRequires:  zlib-devel
16 Requires:       mimalloc >= 1.7
17 Requires:       tbb >= 2021.3.0
18 ExclusiveArch:  %{ix86} %{x8664} %{arm} aarch64 riscv64
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %description
22 mold is a faster drop-in replacement for existing Unix linkers. It is
23 several times faster than LLVM lld linker, the second-fastest
24 open-source linker which I originally created a few years ago. mold is
25 created for increasing developer productivity by reducing build time
26 especially in rapid debug-edit-rebuild cycles.
27
28 %prep
29 %setup -q
30
31 %{__rm} -r third-party/{mimalloc,tbb}
32
33 %build
34 %{__make} \
35         CC="%{__cc}" \
36         CXX="%{__cxx}" \
37         CFLAGS="%{rpmcppflags} %{rpmcflags}" \
38         CXXFLAGS="%{rpmcppflags} %{rpmcxxflags}" \
39         LDFLAGS="%{rpmldflags}" \
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*
This page took 0.071441 seconds and 2 git commands to generate.