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