]> git.pld-linux.org Git - packages/mold.git/blob - mold.spec
7860a7872d17998009e6a914dc1a5d2b564a2f7e
[packages/mold.git] / mold.spec
1 Summary:        mold: A Modern Linker
2 Name:           mold
3 Version:        1.0.2
4 Release:        2
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:  6308dd1775808fdcf83538927239ebdb
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
33 %{__make} \
34         CC="%{__cc}" \
35         CXX="%{__cxx}" \
36         CFLAGS="%{rpmcppflags} %{rpmcflags}" \
37         CXXFLAGS="%{rpmcppflags} %{rpmcxxflags}" \
38         LDFLAGS="%{rpmldflags}" \
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
70 %dir %{_libexecdir}/mold
71 %attr(755,root,root) %{_libexecdir}/mold/ld
72 %{_mandir}/man1/mold.1*
This page took 0.089966 seconds and 2 git commands to generate.