]> git.pld-linux.org Git - packages/mold.git/blob - mold.spec
up to 1.2.1
[packages/mold.git] / mold.spec
1 Summary:        mold: A Modern Linker
2 Name:           mold
3 Version:        1.2.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:  69ba53ea65a09354a5cec09d9c574472
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:  pkgconfig
18 BuildRequires:  rpmbuild(macros) >= 2.007
19 BuildRequires:  tbb-devel >= 2021.3.0
20 BuildRequires:  zlib-devel
21 Requires:       mimalloc >= 1.7
22 Requires:       tbb >= 2021.3.0
23 ExclusiveArch:  %{ix86} %{x8664} %{arm} aarch64 riscv64
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
35 %patch0 -p1
36
37 %{__rm} -r third-party/{mimalloc,tbb}
38
39 %build
40 %{__make} \
41         ARCH="%{_target_cpu}" \
42         CC="%{__cc}" \
43         CXX="%{__cxx}" \
44         CFLAGS="%{rpmcppflags} %{rpmcflags}" \
45         CXXFLAGS="%{rpmcppflags} %{rpmcxxflags}" \
46         LDFLAGS="%{rpmldflags}" \
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
78 %dir %{_libexecdir}/mold
79 %attr(755,root,root) %{_libexecdir}/mold/ld
80 %{_mandir}/man1/mold.1*
This page took 0.122875 seconds and 3 git commands to generate.