Bump version to 1.5.1

This commit is contained in:
Christoph Erhardt 2022-09-29 16:55:45 +02:00
parent 0802548a73
commit eaa247a887
4 changed files with 86 additions and 25 deletions

View File

@ -1,32 +1,46 @@
From cb62c8b3cc981cbffa3b151d15961573c71fac51 Mon Sep 17 00:00:00 2001
Message-Id: <cb62c8b3cc981cbffa3b151d15961573c71fac51.1662274415.git.github@sicherha.de>
From db11436c0ccbfee0f617ae7498c25fb2f4e76626 Mon Sep 17 00:00:00 2001
Message-Id: <db11436c0ccbfee0f617ae7498c25fb2f4e76626.1664460024.git.github@sicherha.de>
From: Christoph Erhardt <github@sicherha.de>
Date: Sat, 6 Aug 2022 09:18:54 +0200
Subject: [PATCH] Use system-compatible include path for `xxhash.h`
Date: Tue, 27 Sep 2022 13:32:57 +0200
Subject: [PATCH 1/2] Use system-compatible include path for `xxhash.h`
Distributors that build mold against the system-provided xxHash package
expect its header file `xxhash.h` in the top-level include directory,
not in an `xxhash` subdirectory. Adjust the include path and the
`#include` directive accordingly.
---
Makefile | 1 +
mold.h | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
CMakeLists.txt | 2 ++
Makefile | 1 +
mold.h | 2 +-
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 79c035d5..520c7bdf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -126,6 +126,8 @@ else()
mold_add_tbb()
endif()
+target_include_directories(mold PRIVATE third-party/xxhash)
+
if(WIN32)
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
message(FATAL_ERROR
diff --git a/Makefile b/Makefile
index d3f47801..59943a9c 100644
index 2d14c85f..40fa5aab 100644
--- a/Makefile
+++ b/Makefile
@@ -47,6 +47,7 @@ CXXFLAGS = -O2
@@ -59,6 +59,7 @@ CXXFLAGS = -O2
MOLD_CXXFLAGS := -std=c++20 -fno-exceptions -fno-unwind-tables \
-fno-asynchronous-unwind-tables \
+ -Ithird-party -Ithird-party/xxhash \
+ -Ithird-party/xxhash \
-Wno-sign-compare -Wno-unused-function \
-DMOLD_VERSION=\"$(VERSION)\" -DLIBDIR="\"$(LIBDIR)\""
ifeq ($(OS), OpenBSD)
diff --git a/mold.h b/mold.h
index 94ef8226..9f857534 100644
index b1b859bd..c8dbfcf2 100644
--- a/mold.h
+++ b/mold.h
@@ -32,7 +32,7 @@
@ -39,5 +53,5 @@ index 94ef8226..9f857534 100644
#ifdef NDEBUG
# define unreachable() __builtin_unreachable()
--
2.37.2
2.37.3

View File

@ -0,0 +1,40 @@
From f6f03510d6c19e6009c903fed00294813126db3b Mon Sep 17 00:00:00 2001
Message-Id: <f6f03510d6c19e6009c903fed00294813126db3b.1664460024.git.github@sicherha.de>
In-Reply-To: <db11436c0ccbfee0f617ae7498c25fb2f4e76626.1664460024.git.github@sicherha.de>
References: <db11436c0ccbfee0f617ae7498c25fb2f4e76626.1664460024.git.github@sicherha.de>
From: Rui Ueyama <ruiu@bluewhale.systems>
Date: Thu, 29 Sep 2022 15:41:28 +0800
Subject: [PATCH 2/2] [ELF] Fix test for PPC64LE
`readelf --symbols` print out auxiliary information after a symbol name
for PPC64, so something like `foo$` didn't match.
7: 0000000000000000 80 FUNC GLOBAL DEFAULT 3 main [<localentry>: 8]
8: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND .TOC.
9: 0000000000000000 72 FUNC GLOBAL DEFAULT 11 foo [<localentry>: 8]
10: 0000000000000000 40 FUNC GLOBAL DEFAULT 19 bar
Fixes https://github.com/rui314/mold/issues/739
---
test/elf/relocatable-archive.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/test/elf/relocatable-archive.sh b/test/elf/relocatable-archive.sh
index e5544bb8..759cd871 100755
--- a/test/elf/relocatable-archive.sh
+++ b/test/elf/relocatable-archive.sh
@@ -38,8 +38,8 @@ ar crs $t/e.a $t/a.o $t/b.o $t/c.o
./mold -r -o $t/f.o $t/d.o $t/e.a
readelf --symbols $t/f.o > $t/log
-grep -q 'foo$' $t/log
-grep -q 'bar$' $t/log
-! grep -q 'baz$' $t/log || false
+grep -q 'foo\b' $t/log
+grep -q 'bar\b' $t/log
+! grep -q 'baz\b' $t/log || false
echo OK
--
2.37.3

View File

@ -1,5 +1,5 @@
Name: mold
Version: 1.4.2
Version: 1.5.1
Release: 1%{?dist}
Summary: A Modern Linker
@ -17,8 +17,11 @@ Patch0: tbb-strip-werror.patch
# Allow building against the system-provided `xxhash.h`
Patch2: 0001-Use-system-compatible-include-path-for-xxhash.h.patch
# Fix unit test failing on ppc64
Patch3: 0002-ELF-Fix-test-for-PPC64LE.patch
# mold can currently produce native binaries for these architectures only
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 riscv64
ExclusiveArch: %{ix86} x86_64 %{arm32} aarch64 ppc64le %{riscv32} %{riscv64} sparc64 sparc64v
BuildRequires: cmake
%if 0%{?el8}
@ -27,9 +30,9 @@ BuildRequires: gcc-toolset-10-toolchain
BuildRequires: gcc
BuildRequires: gcc-c++ >= 10
%endif
BuildRequires: libzstd-devel
BuildRequires: mimalloc-devel
BuildRequires: openssl-devel
BuildRequires: python3
BuildRequires: xxhash-devel
BuildRequires: zlib-devel
@ -45,7 +48,6 @@ BuildRequires: libdwarf-tools
%endif
BuildRequires: libstdc++-static
BuildRequires: llvm
BuildRequires: perl
Requires(post): %{_sbindir}/alternatives
Requires(preun): %{_sbindir}/alternatives
@ -54,8 +56,6 @@ Requires(preun): %{_sbindir}/alternatives
# https://bugzilla.redhat.com/show_bug.cgi?id=2036372
Provides: bundled(tbb) = 2021.5
%define build_args PREFIX=%{_prefix} LIBDIR=%{_libdir} CFLAGS="%{build_cflags}" CXXFLAGS="%{build_cxxflags} -Wno-sign-compare" LDFLAGS="%{build_ldflags}" STRIP=echo SYSTEM_MIMALLOC=1
%description
mold is a faster drop-in replacement for existing Unix linkers.
It is several times faster than the LLVM lld linker.
@ -64,17 +64,17 @@ build time, especially in rapid debug-edit-rebuild cycles.
%prep
%autosetup -p1
rm -r third-party/{mimalloc,xxhash}
rm -r third-party/{mimalloc,xxhash,zlib,zstd}
%build
%if 0%{?el8}
. /opt/rh/gcc-toolset-10/enable
%endif
%make_build %{build_args}
%cmake -DMOLD_USE_SYSTEM_MIMALLOC=ON
%cmake_build
%install
%make_install %{build_args}
chmod +x %{buildroot}%{_libdir}/mold/mold-wrapper.so
%cmake_install
%post
if [ "$1" = 1 ]; then
@ -90,7 +90,7 @@ fi
%if 0%{?el8}
. /opt/rh/gcc-toolset-10/enable
%endif
%make_build %{build_args} test
%ctest
%files
%license %{_docdir}/mold/LICENSE
@ -104,6 +104,13 @@ fi
%{_mandir}/man1/mold.1*
%changelog
* 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
* Sun Sep 04 2022 Christoph Erhardt <fedora@sicherha.de> - 1.4.2-1
- Bump version to 1.4.2
- Refresh patch

View File

@ -1 +1 @@
SHA512 (mold-1.4.2.tar.gz) = 17f543969e53737818b0be563aee39feac672f93e0fd712827523232b64eccb4629f3994c5a90de50b5f761886669e0946a8d463663725e774eb7d352de1ced1
SHA512 (mold-1.5.1.tar.gz) = 340a45c5190ce5ba87eaa05238da7c70400bf4a2788a095935b9675593078ad76bbd95e67aa36b3ec683428724a3c6bc27c7e0a69569afce461682dc4bd16b10