summaryrefslogtreecommitdiff
path: root/sys-devel
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-12-21 06:30:52 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-12-21 06:30:52 +0000
commitd2bcdab82e5f5f38a8ab54026e8aa94edb1b77a6 (patch)
tree0d75edaef0b7c0db490d25119f6b17b386d41c58 /sys-devel
parent9097a9c06c0b1e11c7f6579f03e3f32948be3f24 (diff)
gentoo auto-resync : 21:12:2024 - 06:30:51
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/Manifest.gzbin6212 -> 6214 bytes
-rw-r--r--sys-devel/mold/Manifest5
-rw-r--r--sys-devel/mold/files/mold-2.35.1-system-mimalloc.patch64
-rw-r--r--sys-devel/mold/mold-2.35.1.ebuild105
-rw-r--r--sys-devel/mold/mold-9999.ebuild4
5 files changed, 173 insertions, 5 deletions
diff --git a/sys-devel/Manifest.gz b/sys-devel/Manifest.gz
index 2cb54880290b..91af12e94612 100644
--- a/sys-devel/Manifest.gz
+++ b/sys-devel/Manifest.gz
Binary files differ
diff --git a/sys-devel/mold/Manifest b/sys-devel/mold/Manifest
index 837a9d6e1054..44761711255d 100644
--- a/sys-devel/mold/Manifest
+++ b/sys-devel/mold/Manifest
@@ -1,9 +1,12 @@
AUX mold-2.34.1-linux-6.11.patch 940 BLAKE2B b089023c689323046456d7484d89f6577feabf90f4695ee512cadccd6fc07869b2c0aad5854cca2c67eb0dc0d7b2f0f5437c7e5c870348042dd0038ff4466d22 SHA512 6d67d779a10ea82aab807f76b2314e152e65c9d8a0daa5f565bd91a13eb8f90fd4f86b2c45f3c87249871ecd17fe0642e93430e3d86989b65a719658ee2c0163
+AUX mold-2.35.1-system-mimalloc.patch 2389 BLAKE2B 064158b46264e45aeaa6ddc1d1abf596fbd0acaf3ced214ca12b79c380808ec45acabe4b1171ba86dbbabdf417e65fd3ff467c3b04adac936e4de0f4356340bf SHA512 73c2ceb112a6d3d45e5e7f72f918e31063fe8d0eb7932cffa6ac84952f3848d4639a1a6a32b3e4ecb53d27f72716a4ecee9e56a4148a8e600b2cb0f072b39a63
DIST mold-2.1.0.tar.gz 9278811 BLAKE2B b31e13f92177553adf5069cf35c8c75c7bc28f0af4d1726cdc0c6abc1c9d3baaa5be512c3a8fb9bc3c3110096a79e1c6751c701171769595a2234fc1fa8c441a SHA512 f1c98d349b35b4042109d71f7db6eb8d7d089dc3241735bbd7b5402d513dcc85ca17904828779e5fc8234650fa9fb97f47c3a2f3e89cc2fb3cb9e9110439e5a2
DIST mold-2.34.1.tar.gz 10057683 BLAKE2B 9a9b166e64c4e5d48631147e781ce0d58acf76420f172bdee31fe5c44f37a8e2b098ae5696b52b668255f9a5967b0fb567a51d9fb8b26cddba0e14ed5a3e3464 SHA512 6ddfda8b81b710555272ee67eac7f2b3088a7a78f308843caa1730c1b631fc7031b8f5eac33379b9926c9f000d7b27864c12bb62ea75051d2f1caf9f9d2946ab
DIST mold-2.35.0.tar.gz 10056856 BLAKE2B 9b039031047263aa959aa6f2bf296d11d51bf02d0a66afa76e08200d4547ee5d66cf522497b86fce7fd8cbd43559b8d19ad0264c749833988592cf7291fd55fe SHA512 6f7be924cb6ea38c0089f0c34beec9ef51160daea3510dac4ed68c519efefe4496739271b35c271f7384c9e436bd8a0636ce47e0847aa2b4daf227accecc7314
+DIST mold-2.35.1.tar.gz 10094602 BLAKE2B 4943588d116a4631ad4404a4f2d92c4f9745546ec1ab7054df2af766f270c634c571f90d5e224f5441e48a3b310819f6993e56d5574c60032dd547d68d08fc64 SHA512 30d9cadfe57288e80ffcaddf1bf7df7b3bff75d337ea2b612bdffa3de3f7bd908b02d24c1f848d4ad0e82f72cd0e04c33ddd01d23c549d81aac5af58e63dbab4
EBUILD mold-2.1.0.ebuild 2169 BLAKE2B b91dec8fb9890052e06cf40124f7647833a6ea786d95d44863848bfff17c0ba335f28aaac08d6971a619dbb845b9091d1134bae47f70bd811d2fde0f9ca11066 SHA512 5d27926e5003e6bd24ee3baf8258ab043aa660b7a36918500283bbec9d991ad8ea6971add52579ba6ee10a7eeeb97a6dff3a7e065c7292ced42d2f0043e33d1e
EBUILD mold-2.34.1-r1.ebuild 2607 BLAKE2B c66a19a984037a201d104e8365bc99b27c4bbe7c5ebc293853c0531d702a7c8a91acbe89a59092d1b4c80f1cf4559623d6c49095e9f90069341190887b225790 SHA512 616530beced37416e392c1a2b240353abdfb8526ac03d9b058894bff8102cd0ae3fb9a0d516348c6152c15367f0e389e9c39bd59a438a0adcfa08d7bc20b2337
EBUILD mold-2.35.0.ebuild 2700 BLAKE2B 22391c2b5d7f50668b01b96b193d6c269bf7c55ddb209332f9d1f1bf528794c0eaf41846b643c3a59914f24b1dce77b5613d235ec6ec9c626399d63a13a40151 SHA512 d901bd69d355bbb86f322134f6307d7854bfb0ff442de82ed39636d26e5b5577a76ff2f70ae87489092c848d58eeac36b6fe0f6e7caac75bab43d389db122b29
-EBUILD mold-9999.ebuild 2591 BLAKE2B c3c6e2f435b2e42230c9efaa90ca7f183c55d7dc15c16d1cbceadac99dc50103e164b1408ecb8081a84b944493aa3afd918aad02c55caa768a7aa9791183f8d7 SHA512 8cdecad2618ab9d82828af0016806d110b8adef0361031c7882ab258e8fbbac78a98e5b3b036f4b5fccc1b72f3315eb0d56e32e87927a6bd171deffef0bd27a7
+EBUILD mold-2.35.1.ebuild 2588 BLAKE2B 0eae4255e1829716d33bcb4e16f3498add897e253098ba66c16a0a2ebf0412360278a87a2670572fc4bb39b634434ac45948732be5e15fc94308aa2d6120789a SHA512 7985a2270d8e459e7260504d79dfe5b0276233cdfc8bfd2894e896b92218e1a6d6e96e742bada35a539d7e39800558e0f379e2e41efd15e6b8feeccc5fd95aef
+EBUILD mold-9999.ebuild 2533 BLAKE2B 3eeacc3dd5ff48ca4d836c93159d1d8f0045c995a494934dbe77b4888adf1348244ff8e358794796855a5542e86c84af082970854a2b9897b8b66315da0a4944 SHA512 85986bd7f93da14a5b6f883ca7d266a322b049d780a136a94f49975a34825e681d083c9180ceb6c5d0c7e3dba47f4b560c70edbe3f290c823ce1bf6d986600ec
MISC metadata.xml 424 BLAKE2B a1c0cbdcb86c323fa1e6143c9665ec548f7713e74002a25b2fc26c51b60dae00922d3448a5aaecd5027a8cb026a681386ca7dea90657a3e10b25fb194dafc0d3 SHA512 1adc934e78ca0210743a1aa7479ebc4b5ea0b66a348c4408423460f02b404b885d3a8eca6e89ea8ac53ac9c76e85116965f1eef79e3f3e1f0451c8cf5ce0dfd6
diff --git a/sys-devel/mold/files/mold-2.35.1-system-mimalloc.patch b/sys-devel/mold/files/mold-2.35.1-system-mimalloc.patch
new file mode 100644
index 000000000000..c0abe4b5fd68
--- /dev/null
+++ b/sys-devel/mold/files/mold-2.35.1-system-mimalloc.patch
@@ -0,0 +1,64 @@
+https://github.com/rui314/mold/commit/9c9145eb6e5381b69f47bdfb11eeffb7b9febb8b
+https://github.com/rui314/mold/commit/ac9568f17b9054e92fed95a862ec83701336cd37
+
+From 9c9145eb6e5381b69f47bdfb11eeffb7b9febb8b Mon Sep 17 00:00:00 2001
+From: Christoph Erhardt <github@sicherha.de>
+Date: Thu, 19 Dec 2024 21:55:41 +0100
+Subject: [PATCH] Add missing `#include "common.h"`
+
+This allows the compiler to make sure that the implementation of
+`set_mimalloc_options()` matches its declaration.
+
+More importantly, it indirectly pulls in `config.h`, where the macros
+`MOLD_USE_SYSTEM_MIMALLOC` and `MOLD_USE_MIMALLOC` are conditionally
+defined. Without these, the build configuration is ignored.
+---
+ lib/mimalloc.cc | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/lib/mimalloc.cc b/lib/mimalloc.cc
+index 637d5e8ce7..823b91b8e9 100644
+--- a/lib/mimalloc.cc
++++ b/lib/mimalloc.cc
+@@ -1,3 +1,5 @@
++#include "common.h"
++
+ // Including mimalloc-new-delete.h overrides new/delete operators.
+ // We need it only when we are using mimalloc as a dynamic library.
+ #if MOLD_USE_SYSTEM_MIMALLOC
+
+From ac9568f17b9054e92fed95a862ec83701336cd37 Mon Sep 17 00:00:00 2001
+From: Christoph Erhardt <github@sicherha.de>
+Date: Thu, 19 Dec 2024 23:40:12 +0100
+Subject: [PATCH] Disable mimalloc when a sanitizer is used
+
+Combining mimalloc and AddressSanitizer triggers a segmentation fault in
+many tests.
+
+Combining mimalloc and ThreadSanitizer leads to duplicate symbols for
+the `new` and `delete`
+operators, causing the build to fail.
+Example message from a failed GitHub Actions build:
+```
+mold: error: duplicate symbol:
+third-party/mimalloc/libmimalloc-debug.a(alloc.c.o):
+/usr/lib/llvm-18/lib/clang/18/lib/linux/libclang_rt.tsan_cxx-x86_64.a(tsan_new_delete.cpp.o):
+operator delete(void*, std::align_val_t)
+```
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d8643961d9..c451ea952a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -180,7 +180,7 @@ endif()
+ # be stable on 32-bit targets.
+ cmake_dependent_option(
+ MOLD_USE_MIMALLOC "Use mimalloc" ON
+- "CMAKE_SIZEOF_VOID_P EQUAL 8; NOT APPLE; NOT ANDROID; NOT OPENBSD" OFF)
++ "CMAKE_SIZEOF_VOID_P EQUAL 8; NOT APPLE; NOT ANDROID; NOT OPENBSD; NOT MOLD_USE_ASAN; NOT MOLD_USE_TSAN" OFF)
+
+ cmake_dependent_option(
+ MOLD_USE_SYSTEM_MIMALLOC "Use system or vendored mimalloc" OFF
diff --git a/sys-devel/mold/mold-2.35.1.ebuild b/sys-devel/mold/mold-2.35.1.ebuild
new file mode 100644
index 000000000000..142325bfb19f
--- /dev/null
+++ b/sys-devel/mold/mold-2.35.1.ebuild
@@ -0,0 +1,105 @@
+# Copyright 2021-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake flag-o-matic toolchain-funcs
+
+DESCRIPTION="A Modern Linker"
+HOMEPAGE="https://github.com/rui314/mold"
+if [[ ${PV} == 9999 ]] ; then
+ EGIT_REPO_URI="https://github.com/rui314/mold.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/rui314/mold/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+ # -alpha: https://github.com/rui314/mold/commit/3711ddb95e23c12991f6b8c7bfeba4f1421d19d4
+ KEYWORDS="-alpha ~amd64 ~arm ~arm64 ~loong ~ppc ~riscv ~sparc ~x86"
+fi
+
+# mold (MIT)
+# - xxhash (BSD-2)
+# - siphash ( MIT CC0-1.0 )
+LICENSE="MIT BSD-2 CC0-1.0"
+SLOT="0"
+IUSE="debug"
+
+RDEPEND="
+ app-arch/zstd:=
+ >=dev-cpp/tbb-2021.7.0-r1:=
+ dev-libs/blake3:=
+ sys-libs/zlib
+ !kernel_Darwin? (
+ >=dev-libs/mimalloc-2:=
+ )
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-system-mimalloc.patch
+)
+
+pkg_pretend() {
+ # Requires a c++20 compiler, see #831473
+ if [[ ${MERGE_TYPE} != binary ]]; then
+ if tc-is-gcc && [[ $(gcc-major-version) -lt 10 ]]; then
+ die "${PN} needs at least gcc 10"
+ elif tc-is-clang && [[ $(clang-major-version) -lt 12 ]]; then
+ die "${PN} needs at least clang 12"
+ fi
+ fi
+}
+
+src_prepare() {
+ cmake_src_prepare
+
+ # Needs unpackaged dwarfdump
+ rm test/{{dead,compress}-debug-sections,compressed-debug-info}.sh || die
+
+ # Heavy tests, need qemu
+ rm test/gdb-index-{compress-output,dwarf{2,3,4,5}}.sh || die
+ rm test/lto-{archive,dso,gcc,llvm,version-script}.sh || die
+
+ # Sandbox sadness
+ rm test/run.sh || die
+ sed -i 's|`pwd`/mold-wrapper.so|"& ${LD_PRELOAD}"|' \
+ test/mold-wrapper{,2}.sh || die
+
+ # static-pie tests require glibc built with static-pie support
+ if ! has_version -d 'sys-libs/glibc[static-pie(+)]'; then
+ rm test/{,ifunc-}static-pie.sh || die
+ fi
+}
+
+src_configure() {
+ use debug || append-cppflags "-DNDEBUG"
+
+ local mycmakeargs=(
+ -DMOLD_ENABLE_QEMU_TESTS=OFF
+ -DMOLD_LTO=OFF # Should be up to the user to decide this with CXXFLAGS.
+ -DMOLD_USE_MIMALLOC=$(usex !kernel_Darwin)
+ -DMOLD_USE_SYSTEM_MIMALLOC=ON
+ -DMOLD_USE_SYSTEM_TBB=ON
+ )
+ cmake_src_configure
+}
+
+src_test() {
+ export TEST_CC="$(tc-getCC)" TEST_GCC="$(tc-getCC)" \
+ TEST_CXX="$(tc-getCXX)" TEST_GXX="$(tc-getCXX)"
+ cmake_src_test
+}
+
+src_install() {
+ dobin "${BUILD_DIR}"/${PN}
+
+ # https://bugs.gentoo.org/872773
+ insinto /usr/$(get_libdir)/mold
+ doins "${BUILD_DIR}"/${PN}-wrapper.so
+
+ dodoc docs/{design,execstack}.md
+ doman docs/${PN}.1
+
+ dosym ${PN} /usr/bin/ld.${PN}
+ dosym ${PN} /usr/bin/ld64.${PN}
+ dosym -r /usr/bin/${PN} /usr/libexec/${PN}/ld
+}
diff --git a/sys-devel/mold/mold-9999.ebuild b/sys-devel/mold/mold-9999.ebuild
index d7e4c65e6171..e0398e86fe4b 100644
--- a/sys-devel/mold/mold-9999.ebuild
+++ b/sys-devel/mold/mold-9999.ebuild
@@ -34,10 +34,6 @@ RDEPEND="
"
DEPEND="${RDEPEND}"
-PATCHES=(
- "${FILESDIR}"/${PN}-2.34.1-linux-6.11.patch
-)
-
pkg_pretend() {
# Requires a c++20 compiler, see #831473
if [[ ${MERGE_TYPE} != binary ]]; then