]> git.pld-linux.org Git - packages/mold.git/blame - mold.spec
new
[packages/mold.git] / mold.spec
CommitLineData
a2080a44
JP
1Summary: mold: A Modern Linker
2Name: mold
3Version: 1.0.0
4Release: 1
5License: GPL v3+
6Group: Development/Libraries
7Source0: https://github.com/rui314/mold/archive/v%{version}/%{name}-%{version}.tar.gz
8# Source0-md5: 27e4b3bc9ae9b65a9bc90785de31ace6
9URL: https://github.com/rui314/mold
10BuildRequires: libstdc++-devel >= 6:10
11BuildRequires: mimalloc-devel >= 1.7
12BuildRequires: openssl-devel
13BuildRequires: tbb-devel >= 2021.3.0
14BuildRequires: xxHash-devel
15BuildRequires: zlib-devel
16Requires: mimalloc >= 1.7
17Requires: tbb >= 2021.3.0
18BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20%description
21mold is a faster drop-in replacement for existing Unix linkers. It is
22several times faster than LLVM lld linker, the second-fastest
23open-source linker which I originally created a few years ago. mold is
24created for increasing developer productivity by reducing build time
25especially in rapid debug-edit-rebuild cycles.
26
27%prep
28%setup -q
29
30%{__rm} -r third-party/{mimalloc,tbb}
31
32%build
33export CPPFLAGS="%{rpmcppflags}"
34export CFLAGS="%{rpmcflags}"
35export CXXFLAGS="%{rpmcxxflags}"
36export LDFLAGS="%{rpmldflags}"
37%{__make} \
38 CC="%{__cc}" \
39 CXX="%{__cxx}" \
40 SYSTEM_MIMALLOC=1 \
41 SYSTEM_TBB=1 \
42 PREFIX="%{_prefix}" \
43 BINDIR="%{_bindir}" \
44 LIBDIR="%{_libdir}" \
45 MANDIR="%{_mandir}"
46
47%install
48rm -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
61rm -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%{_mandir}/man1/mold.1*
This page took 0.067591 seconds and 4 git commands to generate.