]> git.pld-linux.org Git - packages/mold.git/blob - mold.spec
upstream fixes for x86 32bit non-PIC failures; rel 2
[packages/mold.git] / mold.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build without tests
4
5 Summary:        mold: A Modern Linker
6 Name:           mold
7 Version:        1.6.0
8 Release:        2
9 License:        GPL v3+
10 Group:          Development/Libraries
11 Source0:        https://github.com/rui314/mold/archive/v%{version}/%{name}-%{version}.tar.gz
12 # Source0-md5:  f6eb0adbc0ebd5dc75aed698bddd1a0e
13 Patch0:         x86-nonpic.patch
14 URL:            https://github.com/rui314/mold
15 BuildRequires:  cmake >= 3.13
16 %{?with_tests:BuildRequires:    glibc-static}
17 %ifarch %{armv6} riscv64
18 BuildRequires:  libatomic-devel
19 %endif
20 BuildRequires:  libstdc++-devel >= 6:10
21 %{?with_tests:BuildRequires:    libstdc++-static >= 6:10}
22 BuildRequires:  mimalloc-devel >= 1.7
23 BuildRequires:  openssl-devel
24 BuildRequires:  rpmbuild(macros) >= 2.007
25 BuildRequires:  tbb-devel >= 2021.3.0
26 BuildRequires:  zlib-devel
27 BuildRequires:  zstd-devel
28 Requires:       mimalloc >= 1.7
29 Requires:       tbb >= 2021.3.0
30 ExclusiveArch:  %{ix86} %{x8664} %{arm} aarch64 ppc64le riscv64 sparc64
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
34 mold is a faster drop-in replacement for existing Unix linkers. It is
35 several times faster than LLVM lld linker, the second-fastest
36 open-source linker which I originally created a few years ago. mold is
37 created for increasing developer productivity by reducing build time
38 especially in rapid debug-edit-rebuild cycles.
39
40 %prep
41 %setup -q
42 %patch0 -p1
43
44 %{__rm} -r third-party/{mimalloc,tbb}
45
46 %build
47 %cmake -B build \
48         %{cmake_on_off tests BUILD_TESTING} \
49         -DMOLD_USE_MIMALLOC:BOOL=ON \
50         -DMOLD_USE_SYSTEM_MIMALLOC:BOOL=ON \
51         -DMOLD_USE_SYSTEM_TBB:BOOL=ON
52
53 %{__make} -C build
54
55 %if %{with tests}
56 %{__make} -C build test
57 %endif
58
59 %install
60 rm -rf $RPM_BUILD_ROOT
61
62 %{__make} -C build install \
63         DESTDIR=$RPM_BUILD_ROOT
64
65 %clean
66 rm -rf $RPM_BUILD_ROOT
67
68 %files
69 %defattr(644,root,root,755)
70 %doc CONTRIBUTING.md README.md docs/*.md
71 %attr(755,root,root) %{_bindir}/ld.mold
72 %attr(755,root,root) %{_bindir}/ld64.mold
73 %attr(755,root,root) %{_bindir}/mold
74 %dir %{_libdir}/mold
75 %attr(755,root,root) %{_libdir}/mold/mold-wrapper.so
76 %dir %{_libexecdir}/mold
77 %attr(755,root,root) %{_libexecdir}/mold/ld
78 %{_mandir}/man1/mold.1*
79 %{_mandir}/man1/ld.mold.1*
This page took 0.139586 seconds and 3 git commands to generate.