summaryrefslogtreecommitdiff
path: root/sys-devel/mold
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-10-18 21:57:33 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-10-18 21:57:33 +0100
commit99c41a033e7745ed8aa9ffbf0f9e1e414e80da4a (patch)
treed7dd421828aea0525f9e8fad6380cdf6daf1ec04 /sys-devel/mold
parente903f5ad5c87da9f55a9c9fa0d0e5c531d25af3f (diff)
gentoo auto-resync : 18:10:2023 - 21:57:33
Diffstat (limited to 'sys-devel/mold')
-rw-r--r--sys-devel/mold/Manifest5
-rw-r--r--sys-devel/mold/files/mold-2.3.0-no-pch.patch12
-rw-r--r--sys-devel/mold/mold-2.3.0.ebuild94
-rw-r--r--sys-devel/mold/mold-9999.ebuild7
4 files changed, 116 insertions, 2 deletions
diff --git a/sys-devel/mold/Manifest b/sys-devel/mold/Manifest
index e263637ac9fa..84573c67e380 100644
--- a/sys-devel/mold/Manifest
+++ b/sys-devel/mold/Manifest
@@ -1,13 +1,16 @@
AUX mold-2.0.0-DT_RELR-dependency.patch 5826 BLAKE2B f728523f8fe758d5f61768b4466e36a5fe44fc019f5c31fa41bf2310ef83db6c7eebfa585f776f0145d6b5727a68a686c0a624702af8ae54624ad2571472c977 SHA512 8ccca7ce514b2dd75a62613554237ef60cb527e892516aba35a6ac62a1a1851d217c5da98c821480a120d83ce071bf01fab390d0e80860d2d65b9ac54a8f03e3
AUX mold-2.0.0-reloc-test-fix.patch 1468 BLAKE2B 197e9876667f4f066d801ff304216498aa4eb718d98badcb1a2eb951ae70984728171f5d1f9945201d7ca316d65a3ee1e3438b3e397246e0bdbc821f109bae59 SHA512 a912f06938d8acac52b673bad8a02ac70f13b47db232a51713d80e33dde93c45c7519b6db24451a072b799d6d7a839aabdb577786758d17535284ebe5b7bb055
+AUX mold-2.3.0-no-pch.patch 457 BLAKE2B ac313a6409a2e43b6d26833231cb26c36d3d34f25b25d4217d50fbd1f39eda9d5b42a1939ca8ee48f6dfb73d3c27d7c6111da9beb67a43c72d3c2beb070303b0 SHA512 c79b3e998cbc23ca7069eed95a7d7871371da9c21b6970fe2a1d8dcd1009466e262f63febbc267d364e552b2eb4bebd5d74bc6dc8084d48d4c0e9e02e1d868bc
DIST mold-1.11.0.tar.gz 8210923 BLAKE2B b3854a14a956dd568625fc28c96636e7cadf81b9a93954601b03e249db0aedf726a5a1f24c0758c8189a936501ebb778b472ee6e958fe9f43cb3c3093b2dda2a SHA512 a9068600dd2db757552cce027f358c0b9e6af0941b92f81c1e99e2dde674bd06cc3533d432258e42a2197d9b3f8e7bb263de281928357a79e4fb17fb19719bc0
DIST mold-2.0.0.tar.gz 9205927 BLAKE2B f80c72c58f4618a74390417fdf90f816810350baf1ac74d21294f5ffba7ee263807175be531c9db77209bd05a31ad11fd84d4aeb03fb057cefac7575f71612d6 SHA512 11c3d1e07fe4fcc28cff58b8e432526e4604aa55b49fa47c9495e439206fb9f6a1686b1c5bd2dc907ffd7fe62ac1c72317619fc8a5d7caaa5c327de585f16827
DIST mold-2.1.0.tar.gz 9278811 BLAKE2B b31e13f92177553adf5069cf35c8c75c7bc28f0af4d1726cdc0c6abc1c9d3baaa5be512c3a8fb9bc3c3110096a79e1c6751c701171769595a2234fc1fa8c441a SHA512 f1c98d349b35b4042109d71f7db6eb8d7d089dc3241735bbd7b5402d513dcc85ca17904828779e5fc8234650fa9fb97f47c3a2f3e89cc2fb3cb9e9110439e5a2
DIST mold-2.2.0.tar.gz 9956678 BLAKE2B 495772b5bfd238a6785676d277da87fe4f10b64513f8f0a4961893e4ae8954ad8bda3d09283de14594d7d056d6c1aeed5be591d6a64868a473eb45737d3b9340 SHA512 1692d1ff154335fdff91a4fafebb3514ed6742035c14e74ec7e552b90428a1cd5341baba9183158b44ae221fd19e86da55e7f04bde317b943a24d0afecb41002
+DIST mold-2.3.0.tar.gz 9958893 BLAKE2B 86235731953902a5cd8fdba8b41d456bd60bf53b96a9e1cc89bdf991a75367b95e5522887be8e9c28f3d777b143ef5d693ff50293188ef222fc45257ce990d24 SHA512 7953cff8f2e9f775f0890aedc5f38ef07aac16118310ee9e1a2a82be8abafa1aa05459a136181978c55763737c7ff47815afdd4423e8f96db8f0237fce13e6b4
EBUILD mold-1.11.0.ebuild 2168 BLAKE2B e6da026cd317d9bce59fb0c802f11571107df36310b4c69c9a1e01386bd989c7c0c785b23eaddee62447ac1aa472096b63156e07640ec7f978c49f08b1c8f765 SHA512 ac3d33eaa80eee576bb4151664bad21647d6517f97a30ac3448a4294f1f92b86a48dd82af340d499510dbca9b84d1960874223ce0c3e229c34efdeacfc4659dd
EBUILD mold-2.0.0-r1.ebuild 2216 BLAKE2B 63f97d8f38f04769b66c914addd6bfa42d877fd002008c66df50cd96827cdf467a759c7726c4fbb3355d9dfb52bc924ffa693cc2c2fb49a3de38cb29d6201863 SHA512 bb5538ce441103f9a45d9f6339dffa27d9904b747b835017c0d761a8498a828cab4db14ffba4a5e520a0a2f35e89b8a7f7c428a70c60ff0fef127b3cb464181f
EBUILD mold-2.0.0-r2.ebuild 2262 BLAKE2B 36664776ccff03553da6d71885104666f3b91be07ab8f4f62c96fc7b116d0499172c9cc43f3b05f5fb2bd6b24f80af93ce0e916ceb7ff6dcefb952c4496cfc16 SHA512 48284ddd900756dcf17cb6e8d7729f7fc45a5019d6760522afcfc6c9e6738df37cafd5e68566569f9465e3288de8f6b4854a9d85d2fc48a0b106a4e3a994e5b0
EBUILD mold-2.1.0.ebuild 2169 BLAKE2B b91dec8fb9890052e06cf40124f7647833a6ea786d95d44863848bfff17c0ba335f28aaac08d6971a619dbb845b9091d1134bae47f70bd811d2fde0f9ca11066 SHA512 5d27926e5003e6bd24ee3baf8258ab043aa660b7a36918500283bbec9d991ad8ea6971add52579ba6ee10a7eeeb97a6dff3a7e065c7292ced42d2f0043e33d1e
EBUILD mold-2.2.0.ebuild 2161 BLAKE2B f303042d401a6329e13056f69feea71a34947fc13c1b982246363946b0313f6a7a1cf3f36e4f8fb714df69cec0ae08635a51152fd8c6faa5b5dd5311302d841b SHA512 8b5fef1437459a02bf15a94db2f7b9ca27e436d275741a1da88effb7476188c7aceb61a4b49caa47a90ddff656e2beecebf77056d572d444aba02c3dae165842
-EBUILD mold-9999.ebuild 2142 BLAKE2B 01fa496b41d3f7ffcc30221b9938c423962afc3076a93820192ff240d22a39019f93df31a1ebadc045d40cdcf6add1522db4d651539e9d86fa57102acf515f1b SHA512 110730282da5dc8c90d9913b6a7322dc858b5a4dfd67be98082dc63528def344372e860b45d2604dfd15fc3fa3051a32ff1612751ad9dd65c22c0dff379f6f47
+EBUILD mold-2.3.0.ebuild 2254 BLAKE2B b768d9a6a562fdc8d376570cd30b960d46e946a08d4ee1ca42d30a5afb4c351b8fe25d8fdf3a3c3e82e4cad2b5d11dffbfb77386db8755545e006adb2dc2ced3 SHA512 eef9344f9832767e76ae50536c725647613bfdc62b0e0bfd782a090434ff04226ab91a382e811ae636efaf7be5b9248e874259acfae3597caa511177aaebc2b2
+EBUILD mold-9999.ebuild 2254 BLAKE2B b768d9a6a562fdc8d376570cd30b960d46e946a08d4ee1ca42d30a5afb4c351b8fe25d8fdf3a3c3e82e4cad2b5d11dffbfb77386db8755545e006adb2dc2ced3 SHA512 eef9344f9832767e76ae50536c725647613bfdc62b0e0bfd782a090434ff04226ab91a382e811ae636efaf7be5b9248e874259acfae3597caa511177aaebc2b2
MISC metadata.xml 424 BLAKE2B a1c0cbdcb86c323fa1e6143c9665ec548f7713e74002a25b2fc26c51b60dae00922d3448a5aaecd5027a8cb026a681386ca7dea90657a3e10b25fb194dafc0d3 SHA512 1adc934e78ca0210743a1aa7479ebc4b5ea0b66a348c4408423460f02b404b885d3a8eca6e89ea8ac53ac9c76e85116965f1eef79e3f3e1f0451c8cf5ce0dfd6
diff --git a/sys-devel/mold/files/mold-2.3.0-no-pch.patch b/sys-devel/mold/files/mold-2.3.0-no-pch.patch
new file mode 100644
index 000000000000..e61b5df01f54
--- /dev/null
+++ b/sys-devel/mold/files/mold-2.3.0-no-pch.patch
@@ -0,0 +1,12 @@
+We generally disable PCH in Gentoo because of how buggy it is.
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -400,7 +400,7 @@ endif()
+
+ # Add frequently included header files for pre-compiling.
+ # target_precompile_headers is supported by CMake 3.16.0 or newer.
+-if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.16.0")
++if(FALSE)
+ if(MOLD_IS_SOLD)
+ target_precompile_headers(mold PRIVATE
+ "$<$<COMPILE_LANGUAGE:CXX>:${CMAKE_SOURCE_DIR}/elf/mold.h>"
diff --git a/sys-devel/mold/mold-2.3.0.ebuild b/sys-devel/mold/mold-2.3.0.ebuild
new file mode 100644
index 000000000000..f16aabe0758e
--- /dev/null
+++ b/sys-devel/mold/mold-2.3.0.ebuild
@@ -0,0 +1,94 @@
+# Copyright 2021-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake 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"
+ KEYWORDS="~amd64 ~arm64 ~loong ~riscv ~x86"
+fi
+
+# mold (MIT)
+# - xxhash (BSD-2)
+LICENSE="MIT BSD-2"
+SLOT="0"
+
+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}"/${PN}-2.3.0-no-pch.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/elf/{{dead,compress}-debug-sections,compressed-debug-info}.sh || die
+
+ # Heavy tests, need qemu
+ rm test/elf/gdb-index-{compress-output,dwarf{2,3,4,5}}.sh || die
+ rm test/elf/lto-{archive,dso,gcc,llvm,version-script}.sh || die
+
+ # Sandbox sadness
+ rm test/elf/run.sh || die
+ sed -i 's|`pwd`/mold-wrapper.so|"& ${LD_PRELOAD}"|' \
+ test/elf/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/elf/{,ifunc-}static-pie.sh || die
+ fi
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON
+ -DMOLD_ENABLE_QEMU_TESTS=OFF
+ -DMOLD_LTO=OFF # Should be up to the user to decide this with CXXFLAGS.
+ -DMOLD_USE_SYSTEM_MIMALLOC=ON
+ -DMOLD_USE_SYSTEM_TBB=ON
+ )
+ cmake_src_configure
+}
+
+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 ../../../usr/bin/${PN} /usr/libexec/${PN}/ld
+}
diff --git a/sys-devel/mold/mold-9999.ebuild b/sys-devel/mold/mold-9999.ebuild
index 42cd25dd9155..f16aabe0758e 100644
--- a/sys-devel/mold/mold-9999.ebuild
+++ b/sys-devel/mold/mold-9999.ebuild
@@ -12,7 +12,7 @@ if [[ ${PV} == 9999 ]] ; then
inherit git-r3
else
SRC_URI="https://github.com/rui314/mold/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
- KEYWORDS="~amd64 ~loong"
+ KEYWORDS="~amd64 ~arm64 ~loong ~riscv ~x86"
fi
# mold (MIT)
@@ -31,6 +31,10 @@ RDEPEND="
"
DEPEND="${RDEPEND}"
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.3.0-no-pch.patch
+)
+
pkg_pretend() {
# Requires a c++20 compiler, see #831473
if [[ ${MERGE_TYPE} != binary ]]; then
@@ -65,6 +69,7 @@ src_prepare() {
src_configure() {
local mycmakeargs=(
+ -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON
-DMOLD_ENABLE_QEMU_TESTS=OFF
-DMOLD_LTO=OFF # Should be up to the user to decide this with CXXFLAGS.
-DMOLD_USE_SYSTEM_MIMALLOC=ON