]> git.pld-linux.org Git - packages/mold.git/blame - mold.spec
up to 1.3.0
[packages/mold.git] / mold.spec
CommitLineData
a2080a44
JP
1Summary: mold: A Modern Linker
2Name: mold
0a2ebcd2 3Version: 1.3.0
591a6948 4Release: 1
a2080a44
JP
5License: GPL v3+
6Group: Development/Libraries
7Source0: https://github.com/rui314/mold/archive/v%{version}/%{name}-%{version}.tar.gz
0a2ebcd2 8# Source0-md5: f7ed6a7246e6ef945494f51e70072ad4
4f192f39 9Patch0: atomic.patch
a2080a44 10URL: https://github.com/rui314/mold
4f192f39
JP
11%ifarch %{armv6} riscv64
12BuildRequires: libatomic-devel
13%endif
a2080a44
JP
14BuildRequires: libstdc++-devel >= 6:10
15BuildRequires: mimalloc-devel >= 1.7
16BuildRequires: openssl-devel
4f192f39 17BuildRequires: rpmbuild(macros) >= 2.007
a2080a44 18BuildRequires: tbb-devel >= 2021.3.0
a2080a44
JP
19BuildRequires: zlib-devel
20Requires: mimalloc >= 1.7
21Requires: tbb >= 2021.3.0
a1637193 22ExclusiveArch: %{ix86} %{x8664} %{arm} aarch64 riscv64
a2080a44
JP
23BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25%description
26mold is a faster drop-in replacement for existing Unix linkers. It is
27several times faster than LLVM lld linker, the second-fastest
28open-source linker which I originally created a few years ago. mold is
29created for increasing developer productivity by reducing build time
30especially in rapid debug-edit-rebuild cycles.
31
32%prep
33%setup -q
4f192f39 34%patch0 -p1
a2080a44
JP
35
36%{__rm} -r third-party/{mimalloc,tbb}
37
38%build
a2080a44 39%{__make} \
4f192f39 40 ARCH="%{_target_cpu}" \
a2080a44
JP
41 CC="%{__cc}" \
42 CXX="%{__cxx}" \
5c950940
JP
43 CFLAGS="%{rpmcppflags} %{rpmcflags}" \
44 CXXFLAGS="%{rpmcppflags} %{rpmcxxflags}" \
45 LDFLAGS="%{rpmldflags}" \
a2080a44
JP
46 SYSTEM_MIMALLOC=1 \
47 SYSTEM_TBB=1 \
48 PREFIX="%{_prefix}" \
49 BINDIR="%{_bindir}" \
50 LIBDIR="%{_libdir}" \
51 MANDIR="%{_mandir}"
52
53%install
54rm -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
67rm -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
5178e76b
JP
77%dir %{_libexecdir}/mold
78%attr(755,root,root) %{_libexecdir}/mold/ld
a2080a44 79%{_mandir}/man1/mold.1*
This page took 0.19419 seconds and 4 git commands to generate.