]> git.pld-linux.org Git - packages/mold.git/blame - mold.spec
upstream fix for crash on %{arm} when throwing cpp exception
[packages/mold.git] / mold.spec
CommitLineData
b5cd69c6
JP
1#
2# Conditional build:
3%bcond_without tests # build without tests
4
a2080a44
JP
5Summary: mold: A Modern Linker
6Name: mold
a32f40a2
JP
7Version: 1.4.1
8Release: 1
a2080a44
JP
9License: GPL v3+
10Group: Development/Libraries
11Source0: https://github.com/rui314/mold/archive/v%{version}/%{name}-%{version}.tar.gz
a32f40a2 12# Source0-md5: e21fff1962e98787ea0636d68d6369af
ccc18225 13Patch0: arm-exception-crash.patch
a2080a44 14URL: https://github.com/rui314/mold
b5cd69c6 15%{?with_tests:BuildRequires: glibc-static}
4f192f39
JP
16%ifarch %{armv6} riscv64
17BuildRequires: libatomic-devel
18%endif
a2080a44 19BuildRequires: libstdc++-devel >= 6:10
b5cd69c6 20%{?with_tests:BuildRequires: libstdc++-static >= 6:10}
a2080a44
JP
21BuildRequires: mimalloc-devel >= 1.7
22BuildRequires: openssl-devel
4f192f39 23BuildRequires: rpmbuild(macros) >= 2.007
a2080a44 24BuildRequires: tbb-devel >= 2021.3.0
a2080a44
JP
25BuildRequires: zlib-devel
26Requires: mimalloc >= 1.7
27Requires: tbb >= 2021.3.0
a1637193 28ExclusiveArch: %{ix86} %{x8664} %{arm} aarch64 riscv64
a2080a44
JP
29BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31%description
32mold is a faster drop-in replacement for existing Unix linkers. It is
33several times faster than LLVM lld linker, the second-fastest
34open-source linker which I originally created a few years ago. mold is
35created for increasing developer productivity by reducing build time
36especially in rapid debug-edit-rebuild cycles.
37
38%prep
39%setup -q
ccc18225 40%patch0 -p1
a2080a44
JP
41
42%{__rm} -r third-party/{mimalloc,tbb}
43
44%build
a2080a44 45%{__make} \
4f192f39 46 ARCH="%{_target_cpu}" \
a2080a44
JP
47 CC="%{__cc}" \
48 CXX="%{__cxx}" \
5c950940
JP
49 CFLAGS="%{rpmcppflags} %{rpmcflags}" \
50 CXXFLAGS="%{rpmcppflags} %{rpmcxxflags}" \
51 LDFLAGS="%{rpmldflags}" \
a2080a44
JP
52 SYSTEM_MIMALLOC=1 \
53 SYSTEM_TBB=1 \
54 PREFIX="%{_prefix}" \
55 BINDIR="%{_bindir}" \
56 LIBDIR="%{_libdir}" \
57 MANDIR="%{_mandir}"
58
b5cd69c6
JP
59%if %{with tests}
60%{__make} check \
61 MACHINE="%{_target_cpu}" \
62 TEST_CC="%{__cc}" \
63 TEST_GCC="%{__cc}" \
64 TEST_CXX="%{__cxx}" \
65 TEST_GXX="%{__cxx}" \
66 SYSTEM_MIMALLOC=1 \
67 SYSTEM_TBB=1
68%endif
69
a2080a44
JP
70%install
71rm -rf $RPM_BUILD_ROOT
72
73%{__make} install \
74 D=$RPM_BUILD_ROOT \
75 SYSTEM_MIMALLOC=1 \
76 SYSTEM_TBB=1 \
77 STRIP=: \
78 PREFIX="%{_prefix}" \
79 BINDIR="%{_bindir}" \
80 LIBDIR="%{_libdir}" \
81 MANDIR="%{_mandir}"
82
83%clean
84rm -rf $RPM_BUILD_ROOT
85
86%files
87%defattr(644,root,root,755)
88%doc CONTRIBUTING.md README.md docs/*.md
89%attr(755,root,root) %{_bindir}/ld.mold
90%attr(755,root,root) %{_bindir}/ld64.mold
91%attr(755,root,root) %{_bindir}/mold
92%dir %{_libdir}/mold
93%attr(755,root,root) %{_libdir}/mold/mold-wrapper.so
5178e76b
JP
94%dir %{_libexecdir}/mold
95%attr(755,root,root) %{_libexecdir}/mold/ld
a2080a44 96%{_mandir}/man1/mold.1*
a32f40a2 97%{_mandir}/man1/ld.mold.1*
This page took 0.332798 seconds and 4 git commands to generate.