mold/mold.spec

185 lines
5.1 KiB
RPMSpec
Raw Normal View History

2022-11-18 07:02:54 +00:00
# Force out-of-source build (needed on el8)
%undefine __cmake_in_source_build
2022-01-25 18:46:31 +00:00
Name: mold
2022-11-19 15:32:13 +00:00
Version: 1.7.1
Release: 1%{?dist}
2022-01-25 18:46:31 +00:00
Summary: A Modern Linker
License: AGPL-3.0-or-later AND (Apache-2.0 OR MIT)
2022-01-25 18:46:31 +00:00
URL: https://github.com/rui314/mold
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
# The bundled build system for tbb tries to strip all Werror from the
# CFLAGS/CXXFLAGS when not building in strict mode (mold doesn't use strict
# mode). We don't want that because it causes the "Werror=format-security"
# option to become "=format-security" and break the build. (similar to a patch
# in the Fedora tbb package)
Patch0: tbb-strip-werror.patch
# Allow building against the system-provided `xxhash.h`
2022-11-19 15:31:54 +00:00
Patch1: 0001-Use-system-compatible-include-path-for-xxhash.h.patch
# Fix out-of-bounds error on ARM (https://github.com/rui314/mold/pull/877)
Patch2: 0002-Fix-out-of-bounds-error-on-aarch64-with-_GLIBCXX_ASS.patch
2022-04-30 19:32:09 +00:00
# mold currently cannot produce native binaries for MIPS
ExcludeArch: %{mips}
2022-01-25 18:46:31 +00:00
BuildRequires: cmake
%if 0%{?el8}
2022-11-18 07:03:28 +00:00
BuildRequires: gcc-toolset-12
%else
BuildRequires: gcc
2022-01-25 18:46:31 +00:00
BuildRequires: gcc-c++ >= 10
%endif
2022-09-29 14:55:45 +00:00
BuildRequires: libzstd-devel
2022-01-25 18:46:31 +00:00
BuildRequires: mimalloc-devel
BuildRequires: openssl-devel
BuildRequires: xxhash-devel
BuildRequires: zlib-devel
2022-10-22 15:26:09 +00:00
# Required by bundled oneTBB
BuildRequires: hwloc-devel
2022-01-25 18:46:31 +00:00
# The following packages are only required for executing the tests
BuildRequires: clang
2022-04-30 19:24:01 +00:00
BuildRequires: gdb
2022-01-25 18:46:31 +00:00
BuildRequires: glibc-static
%if ! 0%{?el8}
2022-04-30 19:24:01 +00:00
%ifarch x86_64
BuildRequires: /usr/lib/libc.so
%endif
BuildRequires: libdwarf-tools
%endif
2022-01-25 18:46:31 +00:00
BuildRequires: libstdc++-static
2022-03-08 21:47:04 +00:00
BuildRequires: llvm
2022-01-25 18:46:31 +00:00
Requires(post): %{_sbindir}/alternatives
Requires(preun): %{_sbindir}/alternatives
# API-incompatible with older tbb 2020.3 currently shipped by Fedora:
# https://bugzilla.redhat.com/show_bug.cgi?id=2036372
2022-04-16 15:14:15 +00:00
Provides: bundled(tbb) = 2021.5
2022-01-25 18:46:31 +00:00
%description
2022-02-22 21:15:29 +00:00
mold is a faster drop-in replacement for existing Unix linkers.
It is several times faster than the LLVM lld linker.
mold is designed to increase developer productivity by reducing
build time, especially in rapid debug-edit-rebuild cycles.
2022-01-25 18:46:31 +00:00
%prep
%autosetup -p1
2022-09-29 14:55:45 +00:00
rm -r third-party/{mimalloc,xxhash,zlib,zstd}
2022-01-25 18:46:31 +00:00
%build
%if 0%{?el8}
2022-11-18 07:03:28 +00:00
. /opt/rh/gcc-toolset-12/enable
2022-01-25 18:46:31 +00:00
%endif
2022-09-29 14:55:45 +00:00
%cmake -DMOLD_USE_SYSTEM_MIMALLOC=ON
%cmake_build
2022-01-25 18:46:31 +00:00
%install
2022-09-29 14:55:45 +00:00
%cmake_install
2022-01-25 18:46:31 +00:00
%post
if [ "$1" = 1 ]; then
%{_sbindir}/alternatives --install %{_bindir}/ld ld %{_bindir}/ld.mold 1
fi
%postun
if [ "$1" = 0 ]; then
%{_sbindir}/alternatives --remove ld %{_bindir}/ld.mold
fi
%check
%if 0%{?el8}
2022-11-18 07:03:28 +00:00
. /opt/rh/gcc-toolset-12/enable
2022-01-25 18:46:31 +00:00
%endif
2022-09-29 14:55:45 +00:00
%ctest
2022-01-25 18:46:31 +00:00
%files
2022-08-18 12:37:59 +00:00
%license %{_docdir}/mold/LICENSE
2022-01-25 18:46:31 +00:00
%ghost %{_bindir}/ld
%{_bindir}/mold
%{_bindir}/ld.mold
%{_bindir}/ld64.mold
%{_libdir}/mold/mold-wrapper.so
%{_libexecdir}/mold/ld
2022-08-18 12:37:59 +00:00
%{_mandir}/man1/ld.mold.1*
2022-01-25 18:46:31 +00:00
%{_mandir}/man1/mold.1*
%changelog
2022-11-19 15:32:13 +00:00
* Sat Nov 19 2022 Christoph Erhardt <fedora@sicherha.de> - 1.7.1-1
- Bump version to 1.7.1
2022-11-18 07:02:54 +00:00
* Fri Nov 18 2022 Christoph Erhardt <fedora@sicherha.de> - 1.7.0-1
- Bump version to 1.7.0
- Drop upstreamed patches
- Move from `ExclusiveArch` to `ExcludeArch` as only MIPS remains unsupported
2022-11-18 07:03:28 +00:00
- Build with GCC 12 on el8
2022-11-18 07:02:54 +00:00
2022-10-22 15:26:09 +00:00
* Sat Oct 22 2022 Christoph Erhardt <fedora@sicherha.de> - 1.6.0-1
- Bump version to 1.6.0
- Add new supported architectures
- Drop upstreamed patch
2022-09-29 14:55:45 +00:00
* Thu Sep 29 2022 Christoph Erhardt <fedora@sicherha.de> - 1.5.1-1
- Bump version to 1.5.1 (#2130132)
- Switch to CMake build
- Remove obsolete dependencies
- Add new supported architectures
- Refresh patch
2022-09-04 20:57:16 +00:00
* Sun Sep 04 2022 Christoph Erhardt <fedora@sicherha.de> - 1.4.2-1
- Bump version to 1.4.2
- Refresh patch
2022-08-18 12:37:59 +00:00
* Thu Aug 18 2022 Christoph Erhardt <fedora@sicherha.de> - 1.4.1-1
- Bump version to 1.4.1 (#2119324)
- Refresh patch
- Remove superfluous directory entries from `%%files`
2022-08-18 12:37:59 +00:00
* Sun Aug 07 2022 Christoph Erhardt <fedora@sicherha.de> - 1.4.0-1
- Bump version to 1.4.0 (#2116004)
- Refresh patch
- Use SPDX notation for `License:` field
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
2022-07-03 13:52:43 +00:00
* Sun Jul 03 2022 Christoph Erhardt <fedora@sicherha.de> - 1.3.1-1
- Bump version to 1.3.1 (#2103365)
2022-06-18 19:46:53 +00:00
* Sat Jun 18 2022 Christoph Erhardt <fedora@sicherha.de> - 1.3.0-1
- Bump version to 1.3.0 (#2098316)
- Drop upstreamed patches
2022-04-30 19:24:01 +00:00
* Sat Apr 30 2022 Christoph Erhardt <fedora@sicherha.de> - 1.2.1-1
- Bump version to 1.2.1
- Drop upstreamed patch
2022-04-30 19:32:09 +00:00
- Add support for 32-bit x86 and Arm
2022-04-30 19:24:01 +00:00
2022-04-16 15:16:35 +00:00
* Sat Apr 16 2022 Christoph Erhardt <fedora@sicherha.de> - 1.2-1
- Bump version to 1.2
- Drop upstreamed patches
- Set correct version of bundled tbb
- Suppress 'comparison between signed and unsigned' warnings
2022-03-08 21:47:04 +00:00
* Tue Mar 08 2022 Christoph Erhardt <fedora@sicherha.de> - 1.1.1-1
- Bump version to 1.1.1
2022-02-22 21:16:29 +00:00
* Mon Feb 21 2022 Christoph Erhardt <fedora@sicherha.de> - 1.1-1
- Bump version to 1.1
- Drop upstreamed patches
- Update description
2022-02-17 07:07:20 +00:00
* Thu Feb 17 2022 Christoph Erhardt <fedora@sicherha.de> - 1.0.2-2
- Rebuild due to mimalloc soname change
2022-01-25 18:46:31 +00:00
* Sun Jan 23 2022 Christoph Erhardt <fedora@sicherha.de> - 1.0.2-1
- Bump version to 1.0.2.
* Sat Jan 01 2022 Christoph Erhardt <fedora@sicherha.de> - 1.0.1-1
- Initial package for version 1.0.1.