The package rpms/mold.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s): https://src.fedoraproject.org/cgit/rpms/mold.git/commit/?id=4b8087c272d389ff... https://src.fedoraproject.org/cgit/rpms/mold.git/commit/?id=c2eb4e5e7397c2af... https://src.fedoraproject.org/cgit/rpms/mold.git/commit/?id=0a4d019d56ab1e13....
Change: +ExclusiveArch: x86_64 aarch64 riscv64 +ExclusiveArch: %{ix86} x86_64 aarch64 riscv64 +ExclusiveArch: x86_64 aarch64 riscv64
Thanks.
Full change: ============
commit 4b8087c272d389ff6c8299106b8ffed110604d36 Author: Christoph Erhardt fedora@sicherha.de Date: Wed Feb 23 08:12:01 2022 +0100
Revert "Try enabling %{ix86}"
This reverts commit c2eb4e5e7397c2af39ed26afdc74612d3c450aa0.
diff --git a/mold.spec b/mold.spec index c4ab880..e17b391 100644 --- a/mold.spec +++ b/mold.spec @@ -21,8 +21,8 @@ Patch1: 0001-Skip-reloc-rodata-test-on-aarch64.patch # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68210 Patch2: 0002-Fix-compatibility-with-libstdc-9.patch
-# mold can currently produce native binaries for these architectures only -ExclusiveArch: %{ix86} x86_64 aarch64 riscv64 +# mold can currently produce native binaries for x86, aarch64 and riscv64 only +ExclusiveArch: x86_64 aarch64 riscv64
BuildRequires: cmake %if 0%{?el7}
commit f8b2cd122d0fd76bb9acc0dddd69e227c7cccb5b Author: Christoph Erhardt fedora@sicherha.de Date: Wed Feb 23 08:11:57 2022 +0100
Revert "Fix failing unit test on i686"
This reverts commit 5eeedfa448f6dc9b698d64dfccc3393d386f90eb.
diff --git a/0003-Fix-dynamic-unit-test-on-i686.patch b/0003-Fix-dynamic-unit-test-on-i686.patch deleted file mode 100644 index 907f712..0000000 --- a/0003-Fix-dynamic-unit-test-on-i686.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 857d311771606ad332264719588af016e5320ede Mon Sep 17 00:00:00 2001 -Message-Id: 857d311771606ad332264719588af016e5320ede.1645598116.git.github@sicherha.de -From: Christoph Erhardt github@sicherha.de -Date: Wed, 23 Feb 2022 07:34:21 +0100 -Subject: [PATCH] Fix dynamic unit test on i686 - -Signed-off-by: Christoph Erhardt github@sicherha.de ---- - test/elf/dynamic.sh | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -diff --git a/test/elf/dynamic.sh b/test/elf/dynamic.sh -index 0ea7ae82..8f9a6628 100755 ---- a/test/elf/dynamic.sh -+++ b/test/elf/dynamic.sh -@@ -30,6 +30,14 @@ EOF - - $CC -B. -o $t/exe -pie $t/b.o - count=$(readelf -W --relocs $t/exe | grep -E 'R_[a-zA-Z0-9_]+_RELATIVE' | wc -l) --readelf -W --dynamic $t/exe | grep -q "RELACOUNT.*\b$count\b" -+ -+case "$(uname -m)" in -+i?86) -+ readelf -W --dynamic $t/exe | grep -q "RELCOUNT.*\b$count\b" -+ ;; -+*) -+ readelf -W --dynamic $t/exe | grep -q "RELACOUNT.*\b$count\b" -+ ;; -+esac - - echo OK --- -2.35.1 - diff --git a/mold.spec b/mold.spec index 874e8d9..c4ab880 100644 --- a/mold.spec +++ b/mold.spec @@ -21,9 +21,6 @@ Patch1: 0001-Skip-reloc-rodata-test-on-aarch64.patch # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68210 Patch2: 0002-Fix-compatibility-with-libstdc-9.patch
-# Fix unit test on i686 -Patch3: 0003-Fix-dynamic-unit-test-on-i686.patch - # mold can currently produce native binaries for these architectures only ExclusiveArch: %{ix86} x86_64 aarch64 riscv64
commit 5eeedfa448f6dc9b698d64dfccc3393d386f90eb Author: Christoph Erhardt fedora@sicherha.de Date: Wed Feb 23 07:36:30 2022 +0100
Fix failing unit test on i686
diff --git a/0003-Fix-dynamic-unit-test-on-i686.patch b/0003-Fix-dynamic-unit-test-on-i686.patch new file mode 100644 index 0000000..907f712 --- /dev/null +++ b/0003-Fix-dynamic-unit-test-on-i686.patch @@ -0,0 +1,34 @@ +From 857d311771606ad332264719588af016e5320ede Mon Sep 17 00:00:00 2001 +Message-Id: 857d311771606ad332264719588af016e5320ede.1645598116.git.github@sicherha.de +From: Christoph Erhardt github@sicherha.de +Date: Wed, 23 Feb 2022 07:34:21 +0100 +Subject: [PATCH] Fix dynamic unit test on i686 + +Signed-off-by: Christoph Erhardt github@sicherha.de +--- + test/elf/dynamic.sh | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/test/elf/dynamic.sh b/test/elf/dynamic.sh +index 0ea7ae82..8f9a6628 100755 +--- a/test/elf/dynamic.sh ++++ b/test/elf/dynamic.sh +@@ -30,6 +30,14 @@ EOF + + $CC -B. -o $t/exe -pie $t/b.o + count=$(readelf -W --relocs $t/exe | grep -E 'R_[a-zA-Z0-9_]+_RELATIVE' | wc -l) +-readelf -W --dynamic $t/exe | grep -q "RELACOUNT.*\b$count\b" ++ ++case "$(uname -m)" in ++i?86) ++ readelf -W --dynamic $t/exe | grep -q "RELCOUNT.*\b$count\b" ++ ;; ++*) ++ readelf -W --dynamic $t/exe | grep -q "RELACOUNT.*\b$count\b" ++ ;; ++esac + + echo OK +-- +2.35.1 + diff --git a/mold.spec b/mold.spec index c4ab880..874e8d9 100644 --- a/mold.spec +++ b/mold.spec @@ -21,6 +21,9 @@ Patch1: 0001-Skip-reloc-rodata-test-on-aarch64.patch # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68210 Patch2: 0002-Fix-compatibility-with-libstdc-9.patch
+# Fix unit test on i686 +Patch3: 0003-Fix-dynamic-unit-test-on-i686.patch + # mold can currently produce native binaries for these architectures only ExclusiveArch: %{ix86} x86_64 aarch64 riscv64
commit c2eb4e5e7397c2af39ed26afdc74612d3c450aa0 Author: Christoph Erhardt fedora@sicherha.de Date: Wed Feb 23 06:43:57 2022 +0100
Try enabling %{ix86}
diff --git a/mold.spec b/mold.spec index e17b391..c4ab880 100644 --- a/mold.spec +++ b/mold.spec @@ -21,8 +21,8 @@ Patch1: 0001-Skip-reloc-rodata-test-on-aarch64.patch # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68210 Patch2: 0002-Fix-compatibility-with-libstdc-9.patch
-# mold can currently produce native binaries for x86, aarch64 and riscv64 only -ExclusiveArch: x86_64 aarch64 riscv64 +# mold can currently produce native binaries for these architectures only +ExclusiveArch: %{ix86} x86_64 aarch64 riscv64
BuildRequires: cmake %if 0%{?el7}
commit e59637bab87d63f69ca2deddf59308d3bb0f4b7a Author: Christoph Erhardt fedora@sicherha.de Date: Wed Feb 23 06:43:19 2022 +0100
Do not parallelise the testsuite execution
This hopefully fixes an issue where the aarch64 builder sporadically runs out of resources: ``` Testing lto-dso ... terminate called after throwing an instance of 'std::runtime_error' what(): pthread_create has failed: Resource temporarily unavailable collect2: fatal error: ld terminated with signal 6 [Aborted], core dumped compilation terminated. ```
diff --git a/mold.spec b/mold.spec index 00dc62b..e17b391 100644 --- a/mold.spec +++ b/mold.spec @@ -102,7 +102,7 @@ fi %if 0%{?el8} . /opt/rh/gcc-toolset-10/enable %endif -%make_build %{build_args} test +%make_build -j1 %{build_args} test
%files %license LICENSE
commit 0a4d019d56ab1e130e35a3c7bca303bef57cdc1d Author: Christoph Erhardt fedora@sicherha.de Date: Tue Feb 22 22:16:29 2022 +0100
Bump version to 1.1
diff --git a/.gitignore b/.gitignore index 306fe31..bb526e4 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /mold-1.0.2.tar.gz +/mold-1.1.tar.gz diff --git a/0001-Fix-out-of-bounds-error-on-aarch64-with-_GLIBCXX_ASS.patch b/0001-Fix-out-of-bounds-error-on-aarch64-with-_GLIBCXX_ASS.patch deleted file mode 100644 index be1412e..0000000 --- a/0001-Fix-out-of-bounds-error-on-aarch64-with-_GLIBCXX_ASS.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 03ba8f93255055adaf69984c17bcfea3b22340db Mon Sep 17 00:00:00 2001 -Message-Id: 03ba8f93255055adaf69984c17bcfea3b22340db.1642970958.git.github@sicherha.de -From: Christoph Erhardt github@sicherha.de -Date: Sun, 23 Jan 2022 21:42:21 +0100 -Subject: [PATCH] Fix out-of-bounds error on aarch64 with `_GLIBCXX_ASSERTIONS` - enabled - -While an iterator may point beyond the last element of a `std::span`, a -pointer may not. - -Fixes #298. - -Signed-off-by: Christoph Erhardt github@sicherha.de ---- - elf/arch-arm64.cc | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/elf/arch-arm64.cc b/elf/arch-arm64.cc -index aba86330..c608ae49 100644 ---- a/elf/arch-arm64.cc -+++ b/elf/arch-arm64.cc -@@ -574,7 +574,7 @@ static void create_thunks(Context<E> &ctx, OutputSection<E> &osec) { - thunk.offset = offset; - - // Scan relocations between B and C to collect symbols that need thunks. -- tbb::parallel_for_each(&members[b], &members[c], [&](InputSection<E> *isec) { -+ tbb::parallel_for_each(members.begin() + b, members.begin() + c, [&](InputSection<E> *isec) { - std::span<ElfRel<E>> rels = isec->get_rels(ctx); - isec->range_extn.resize(rels.size()); - -@@ -619,7 +619,7 @@ static void create_thunks(Context<E> &ctx, OutputSection<E> &osec) { - } - - // Scan relocations again to fix symbol offsets in the last thunk. -- tbb::parallel_for_each(&members[b], &members[c], [&](InputSection<E> *isec) { -+ tbb::parallel_for_each(members.begin() + b, members.begin() + c, [&](InputSection<E> *isec) { - std::span<ElfRel<E>> rels = isec->get_rels(ctx); - - for (i64 i = 0; i < rels.size(); i++) { --- -2.34.1 - diff --git a/0001-Skip-reloc-rodata-test-on-aarch64.patch b/0001-Skip-reloc-rodata-test-on-aarch64.patch new file mode 100644 index 0000000..f0380ba --- /dev/null +++ b/0001-Skip-reloc-rodata-test-on-aarch64.patch @@ -0,0 +1,30 @@ +From e9e051f50f5c4e324bc37b9a67996ca2df1530f5 Mon Sep 17 00:00:00 2001 +Message-Id: e9e051f50f5c4e324bc37b9a67996ca2df1530f5.1645476282.git.github@sicherha.de +From: Christoph Erhardt github@sicherha.de +Date: Mon, 21 Feb 2022 21:44:34 +0100 +Subject: [PATCH] Skip reloc-rodata test on aarch64 + +The test expects an error when an object compiled with `-fno-PIC` is +linked with `-pie`, but that doesn't happen on aarch64. + +Signed-off-by: Christoph Erhardt github@sicherha.de +--- + test/elf/reloc-rodata.sh | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/test/elf/reloc-rodata.sh b/test/elf/reloc-rodata.sh +index 2eeb237c..b9cf8161 100755 +--- a/test/elf/reloc-rodata.sh ++++ b/test/elf/reloc-rodata.sh +@@ -10,6 +10,8 @@ mold="$(pwd)/mold" + t=out/test/elf/$testname + mkdir -p $t + ++[ "$(uname -m)" = aarch64 ] && { echo skipped; exit; } ++ + cat <<EOF | $CC -fno-PIC -c -o $t/a.o -xc - + #include <stdio.h> + +-- +2.35.1 + diff --git a/0002-Fix-compatibility-with-libstdc-9.patch b/0002-Fix-compatibility-with-libstdc-9.patch new file mode 100644 index 0000000..90e547a --- /dev/null +++ b/0002-Fix-compatibility-with-libstdc-9.patch @@ -0,0 +1,38 @@ +From 705cbd8cbbfed2ee4416c0567217f7ef42ced443 Mon Sep 17 00:00:00 2001 +Message-Id: 705cbd8cbbfed2ee4416c0567217f7ef42ced443.1645562924.git.github@sicherha.de +From: Christoph Erhardt github@sicherha.de +Date: Tue, 22 Feb 2022 21:21:18 +0100 +Subject: [PATCH] Fix compatibility with libstdc++ < 9 + +mimalloc does not override the `nothrow` variants of the `delete` +operator because it assumes that their implementation in libstdc++ +redirects to the default `delete` operators. This is not the case for +libstdc++ < 9, where `std::free()` is called directly. + +Upstream bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68210 + +This patch ensures that the `nothrow` `delete` operators are overridden +as well. +--- + main.cc | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/main.cc b/main.cc +index b390b0f7..2aea03a0 100644 +--- a/main.cc ++++ b/main.cc +@@ -6,6 +6,11 @@ + + #ifdef USE_SYSTEM_MIMALLOC + #include <mimalloc-new-delete.h> ++ ++// Additionally override the nothrow delete operators for compatibility with ++// buggy libstdc++ < 9 ++void operator delete(void* p, const std::nothrow_t&) noexcept { mi_free(p); } ++void operator delete[](void* p, const std::nothrow_t&) noexcept { mi_free(p); } + #endif + + namespace mold { +-- +2.35.1 + diff --git a/bundled_lib_system_flags.patch b/bundled_lib_system_flags.patch deleted file mode 100644 index e5704e0..0000000 --- a/bundled_lib_system_flags.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 06537164083e0af844224651bf7e7c7340a47675 Mon Sep 17 00:00:00 2001 -Message-Id: 06537164083e0af844224651bf7e7c7340a47675.1642950243.git.github@sicherha.de -From: Christoph Erhardt github@sicherha.de -Date: Sun, 23 Jan 2022 14:28:45 +0100 -Subject: [PATCH] Pass `CXXFLAGS` to bundled tbb - -This makes work easier for distributions that specify custom hardened -compiler flags. - -Signed-off-by: Christoph Erhardt github@sicherha.de ---- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index e2d7cd97..913ac97a 100644 ---- a/Makefile -+++ b/Makefile -@@ -147,7 +147,7 @@ $(MIMALLOC_LIB): - - $(TBB_LIB): - mkdir -p out/tbb -- (cd out/tbb; cmake -G'Unix Makefiles' -DBUILD_SHARED_LIBS=OFF -DTBB_TEST=OFF -DCMAKE_CXX_FLAGS=-D__TBB_DYNAMIC_LOAD_ENABLED=0 -DTBB_STRICT=OFF ../../third-party/tbb) -+ (cd out/tbb; cmake -G'Unix Makefiles' -DBUILD_SHARED_LIBS=OFF -DTBB_TEST=OFF -DCMAKE_CXX_FLAGS="$(CXXFLAGS) -D__TBB_DYNAMIC_LOAD_ENABLED=0" -DTBB_STRICT=OFF ../../third-party/tbb) - $(MAKE) -C out/tbb tbb - (cd out/tbb; ln -sf *_relwithdebinfo libs) - --- -2.34.1 - diff --git a/mold.spec b/mold.spec index e97731b..00dc62b 100644 --- a/mold.spec +++ b/mold.spec @@ -1,6 +1,6 @@ Name: mold -Version: 1.0.2 -Release: 2%{?dist} +Version: 1.1 +Release: 1%{?dist} Summary: A Modern Linker
License: AGPLv3+ @@ -14,16 +14,15 @@ Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz # in the Fedora tbb package) Patch0: tbb-strip-werror.patch
-# Pass the system's CXXFLAGS and CFLAGS to the bundled libraries to ensure they -# are built with all the Fedora hardening flags and with PIE (otherwise the -# linker errors linking non-PIE code with PIE code). -Patch1: bundled_lib_system_flags.patch +# Skip failing test on aarch64 +Patch1: 0001-Skip-reloc-rodata-test-on-aarch64.patch
-# Fix for failed assertion on aarch64 -Patch2: 0001-Fix-out-of-bounds-error-on-aarch64-with-_GLIBCXX_ASS.patch +# Fix mimalloc compatibility with libstdc++ < 9: +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68210 +Patch2: 0002-Fix-compatibility-with-libstdc-9.patch
-# mold can currently produce native binaries for x86 and aarch64 only -ExclusiveArch: x86_64 aarch64 +# mold can currently produce native binaries for x86, aarch64 and riscv64 only +ExclusiveArch: x86_64 aarch64 riscv64
BuildRequires: cmake %if 0%{?el7} @@ -59,7 +58,7 @@ Requires(preun): %{_sbindir}/alternatives # https://bugzilla.redhat.com/show_bug.cgi?id=2036372 Provides: bundled(tbb) = 2021.3
-%define build_args PREFIX=%{_prefix} LIBDIR=%{_libdir} CC=gcc CXX=g++ CFLAGS="%{build_cflags}" CXXFLAGS="%{build_cxxflags}" LDFLAGS="%{build_ldflags}" STRIP=echo SYSTEM_MIMALLOC=1 SYSTEM_XXHASH=1 +%define build_args PREFIX=%{_prefix} LIBDIR=%{_libdir} CC=gcc CXX=g++ CFLAGS="%{build_cflags}" CXXFLAGS="%{build_cxxflags}" LDFLAGS="%{build_ldflags}" STRIP=echo SYSTEM_MIMALLOC=1
%description mold is a faster drop-in replacement for existing Unix linkers. @@ -118,6 +117,11 @@ fi %{_mandir}/man1/mold.1*
%changelog +* Mon Feb 21 2022 Christoph Erhardt fedora@sicherha.de - 1.1-1 +- Bump version to 1.1 +- Drop upstreamed patches +- Update description + * Thu Feb 17 2022 Christoph Erhardt fedora@sicherha.de - 1.0.2-2 - Rebuild due to mimalloc soname change
diff --git a/sources b/sources index 59c74a6..1be872a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mold-1.0.2.tar.gz) = 27f6664e63c76c32a6e3ec8bfc4b204138926001f5431be94da9ce47a5d9d3b51aa634c5cd6df45be660d52ac0507f7b7eec17134e35db402db5747d2ecc3715 +SHA512 (mold-1.1.tar.gz) = b8b125c77563abe2741c2f32d73ab2b12dff275b92b633fcd015336c6ea735e38e95c3d2afb50e5baace2023d4f9de3eb50d53053eabc2cd2f045110eef4cc1e
commit caac06b970116f61dcf5de3f156a8b3cfdfb7697 Author: Christoph Erhardt fedora@sicherha.de Date: Tue Feb 22 22:15:29 2022 +0100
Update description
diff --git a/mold.spec b/mold.spec index bc907ab..e97731b 100644 --- a/mold.spec +++ b/mold.spec @@ -62,10 +62,10 @@ Provides: bundled(tbb) = 2021.3 %define build_args PREFIX=%{_prefix} LIBDIR=%{_libdir} CC=gcc CXX=g++ CFLAGS="%{build_cflags}" CXXFLAGS="%{build_cxxflags}" LDFLAGS="%{build_ldflags}" STRIP=echo SYSTEM_MIMALLOC=1 SYSTEM_XXHASH=1
%description -mold is a multi-threaded, high-performance linker that is several times faster -than the industry-standard ones, namely, GNU ld, GNU gold or LLVM lld. It is -developed as a drop-in replacement for these linkers and command-line compatible -with them with a few exceptions. +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.
%prep %autosetup -p1
commit 9302df38eb7e845126ec7e7882c361bc160741d1 Author: Christoph Erhardt fedora@sicherha.de Date: Tue Feb 22 22:15:11 2022 +0100
Don't explicitly require gcc on epel
It's already covered by devtoolset-10-toolchain / gcc-toolset-10-toolchain.
diff --git a/mold.spec b/mold.spec index cb4e4ce..bc907ab 100644 --- a/mold.spec +++ b/mold.spec @@ -26,7 +26,6 @@ Patch2: 0001-Fix-out-of-bounds-error-on-aarch64-with-_GLIBCXX_ASS.patch ExclusiveArch: x86_64 aarch64
BuildRequires: cmake -BuildRequires: gcc %if 0%{?el7} BuildRequires: devtoolset-10-toolchain %endif @@ -34,6 +33,7 @@ BuildRequires: devtoolset-10-toolchain BuildRequires: gcc-toolset-10-toolchain %endif %if 0%{!?el7} && 0%{!?el8} +BuildRequires: gcc BuildRequires: gcc-c++ >= 10 %endif BuildRequires: mimalloc-devel
commit b4b2364218fb413dd00e06b4a1a43db2b602490d Author: Christoph Erhardt fedora@sicherha.de Date: Thu Feb 17 08:07:20 2022 +0100
Rebuild due to mimalloc soname change
diff --git a/mold.spec b/mold.spec index e56c342..cb4e4ce 100644 --- a/mold.spec +++ b/mold.spec @@ -1,6 +1,6 @@ Name: mold Version: 1.0.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A Modern Linker
License: AGPLv3+ @@ -118,6 +118,9 @@ fi %{_mandir}/man1/mold.1*
%changelog +* Thu Feb 17 2022 Christoph Erhardt fedora@sicherha.de - 1.0.2-2 +- Rebuild due to mimalloc soname change + * Sun Jan 23 2022 Christoph Erhardt fedora@sicherha.de - 1.0.2-1 - Bump version to 1.0.2.