- Add fix-gdb-index.patch.

- Enable tests.

OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/mold?expand=0&rev=20
This commit is contained in:
Martin Liška
2022-04-19 06:44:11 +00:00
committed by Git OBS Bridge
parent c71a968589
commit 42faa439c5
3 changed files with 221 additions and 0 deletions

View File

@@ -23,6 +23,7 @@ Summary: A Modern Linker (mold)
License: AGPL-3.0-or-later
URL: https://github.com/rui314/mold
Source: https://github.com/rui314/mold/archive/v%{version}/mold-%{version}.tar.gz
Patch0: fix-gdb-index.patch
BuildRequires: cmake
%if %{suse_version} < 1550
BuildRequires: gcc10-c++
@@ -32,6 +33,8 @@ BuildRequires: gcc-c++
BuildRequires: mimalloc-devel
BuildRequires: tbb-devel
%endif
BuildRequires: glibc-devel-static
BuildRequires: libdwarf-tools
BuildRequires: openssl-devel
BuildRequires: xxhash-devel
BuildRequires: zlib-devel
@@ -82,6 +85,15 @@ LIBDIR=%{_libdir} \
LIBEXECDIR=%{_libexecdir} \
%{build_args}
%check
%make_build test -e \
PREFIX=%{_prefix} \
BINDIR=%{_bindir} \
MANDIR=%{_mandir} \
LIBDIR=%{_libdir} \
LIBEXECDIR=%{_libexecdir} \
%{build_args}
%post
"%_sbindir/update-alternatives" --install \
"%_bindir/ld" ld "%_bindir/ld.mold" 1