diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-07-03 08:05:42 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-07-03 08:05:42 +0100 |
commit | 8435c842b9e8fbb2bcc80397ab3aa655000459e2 (patch) | |
tree | b74558e80643a8f074c501e8b4bf7f50f7155455 /sys-devel/mold | |
parent | 5c5e9714c851027611cb726a76ebb8be6d48cbdc (diff) |
gentoo auto-resync : 03:07:2024 - 08:05:42
Diffstat (limited to 'sys-devel/mold')
-rw-r--r-- | sys-devel/mold/Manifest | 3 | ||||
-rw-r--r-- | sys-devel/mold/files/mold-2.32.1-libdl.patch | 20 | ||||
-rw-r--r-- | sys-devel/mold/mold-2.32.1.ebuild | 103 |
3 files changed, 126 insertions, 0 deletions
diff --git a/sys-devel/mold/Manifest b/sys-devel/mold/Manifest index 7b91bbe8382f..d84c62331d00 100644 --- a/sys-devel/mold/Manifest +++ b/sys-devel/mold/Manifest @@ -1,12 +1,15 @@ AUX mold-2.30.0-gcc14.patch 2419 BLAKE2B 91906617dc78f620c34a31381d74bf11551dbe8963c7ac0447acc56314026342b0583441aa1857de5f6fb2255589bb79f76451d72a8a385366ece2b2a89e8960 SHA512 2e2bf547caeddb5c4970bb8f3555e104a16b499017832df86535cfeebb2ca5178fa7ed36c7e27e64a3822aab7985266ef62143668c241a632183ba4a06a19259 AUX mold-2.30.0-which-hunt.patch 985 BLAKE2B 89d1d0ca075b1199911e63cbe87b53066557984d2ef97df89578accda4f7ca10ab279f920cce64eb1329029421750b8aa27bd482f2e6ae3655937200445ed83a SHA512 bd1ca6aba29e1cf96706153544f350a948e08e81645c2d4fb657ed8e8775b239f09f7469f2e5e8d0e6e5dde8cc6c97b938fa4441139d6c8bf5c93923db77974c +AUX mold-2.32.1-libdl.patch 632 BLAKE2B db9a5911f5587c33d27a38347a027c3d93cbca41a0328e6a290760c32a4738db4a7241eb3b041d81c1ebb6e20bd9b752573d4e13e1812925adf07dcda2fe5d4f SHA512 6fd38910d1d7cd1126579b15c7442ceccc8c06ba1c439d647334316b035e2dc7b073239b27d29ae94b7dd83b2b8ba7c6e19377d905530fa9118fcb463985b2d3 DIST mold-2.1.0.tar.gz 9278811 BLAKE2B b31e13f92177553adf5069cf35c8c75c7bc28f0af4d1726cdc0c6abc1c9d3baaa5be512c3a8fb9bc3c3110096a79e1c6751c701171769595a2234fc1fa8c441a SHA512 f1c98d349b35b4042109d71f7db6eb8d7d089dc3241735bbd7b5402d513dcc85ca17904828779e5fc8234650fa9fb97f47c3a2f3e89cc2fb3cb9e9110439e5a2 DIST mold-2.30.0.tar.gz 9957539 BLAKE2B f45924598029dabfb2c02298e1f89aae848cd64e2e87dd80f500de323517db92e62df798feee8a2cd81cb930eff0640c2b9957808a4080f0027884015994ce64 SHA512 7cfba4f0fb332799ad267d3eafb8e2f0057af4484467b3e3fbaf8044220163a2c7e26cd1786510f250844c8b57e30c15167c8dd9688af1773abc580c5605abf3 DIST mold-2.31.0.tar.gz 10031469 BLAKE2B 338f516efcb430c8393fb0d6861b913fa1dd0095226e3d13018255da4f0b4affa168928b1e5cfbd0b5a4efcf840612675f04579f0c1d3c0e2b3c6815d6bef4c0 SHA512 343c62d8c67b74988f762c46999d2d866b2e9a0c69d2b910b12384ea5abc620b30468cd1b1bacfe41474d1c97c8ce2e49d55ca70479691238fb73d83d9adc683 DIST mold-2.32.0.tar.gz 10005686 BLAKE2B a277a29498f4d6b33da49ba038ce5ef1c4a1bd3ac84ea994a2aae5d36139a2ee773e08e1a3ff0a7382da4d2319ce994575e3ed1e5be8e5f7a161045aaf4e2d58 SHA512 66cd95ec65b31749ead7604f921eebd9f8e7faad82f6aa2cd7a179e4f4cb2bd78584ec5a8de000fbd4c37bbbfeb878e40a4e93ca909d1be557d73117e4b38f4b +DIST mold-2.32.1.tar.gz 10010384 BLAKE2B b020d57df25d91fac9b6ef994e9f7f73b6736d18a73be3caebe03a851a1db1986abe395b5481a1e30e01f38362c3705cb5903251b7201c0003c745dee37a5148 SHA512 d38b12faf81ba8015fc0cdb52944ac94366877c3033871a92610087e036d75b3d072baf9bbf107a9029495521e067fb36c0809b5138f90976492547b39c33085 EBUILD mold-2.1.0.ebuild 2169 BLAKE2B b91dec8fb9890052e06cf40124f7647833a6ea786d95d44863848bfff17c0ba335f28aaac08d6971a619dbb845b9091d1134bae47f70bd811d2fde0f9ca11066 SHA512 5d27926e5003e6bd24ee3baf8258ab043aa660b7a36918500283bbec9d991ad8ea6971add52579ba6ee10a7eeeb97a6dff3a7e065c7292ced42d2f0043e33d1e EBUILD mold-2.30.0.ebuild 2456 BLAKE2B f91748ee6adfab7956209111c5e26711db20ad701caf255cb54d04eec8e9cc862f86e43ceb79d90cefac1e427aba479f0c84a590e4d38d16442fb3bd5f5c1538 SHA512 cc2f642d0eb97d2dc35cb25d3649f74ad008dcbc40e37c140e932b20074f156e7e36f1be81c83855372fbcb779f99646a634094fc6265be8fdb0ef42d6a3d4b7 EBUILD mold-2.31.0.ebuild 2366 BLAKE2B 8a846ee78ce57c15d2accd3eafb81579bdac81cd5413f12be3dee97a05d66e026cbf1bf51bc414d52d32785f00babb88437a6adbc52a166e16be9499ca9cbb6c SHA512 68d276a3897dd8ca2a27a1a1f4afc056ab05619d57cc5b8a41367c5550a1d1ac399dfc2ed2c75f34fb1c69cffc5d73a1df998156e3c33309aaca7d0ba3050f0e EBUILD mold-2.32.0.ebuild 2404 BLAKE2B e0dec3ee1e668a31d8e5155f84b60431f8bcc1fec32dbcce73e170c8617faecf2b193b235009cf5dcbeccb4d4396b2ea9a564f8cb2fbc78569ca5c05761145c2 SHA512 780ca7ac4280acf0155c73316dcfdac1dd92316330c0a071ac9ed56367c82af1c9ea07d3d9cd3f6236505912db530a17b39340e1dbe6e6111b813e1c88535260 +EBUILD mold-2.32.1.ebuild 2449 BLAKE2B c1450c08670b802103a27f92fe67333437d1cb01b040baf459cbdbb366e6c4e078d07beb9464b9e96e46eef32013d723a0a310abe3abfd07855a159bbeb78695 SHA512 4218400fcb2b2de8c325047708d741158979a3c2655b72b4325485ae2d750ece53c6833a27e4381d7f9bc73990ce50d2dd4079a5400901983d9ea14a7dc30183 EBUILD mold-9999.ebuild 2404 BLAKE2B e0dec3ee1e668a31d8e5155f84b60431f8bcc1fec32dbcce73e170c8617faecf2b193b235009cf5dcbeccb4d4396b2ea9a564f8cb2fbc78569ca5c05761145c2 SHA512 780ca7ac4280acf0155c73316dcfdac1dd92316330c0a071ac9ed56367c82af1c9ea07d3d9cd3f6236505912db530a17b39340e1dbe6e6111b813e1c88535260 MISC metadata.xml 424 BLAKE2B a1c0cbdcb86c323fa1e6143c9665ec548f7713e74002a25b2fc26c51b60dae00922d3448a5aaecd5027a8cb026a681386ca7dea90657a3e10b25fb194dafc0d3 SHA512 1adc934e78ca0210743a1aa7479ebc4b5ea0b66a348c4408423460f02b404b885d3a8eca6e89ea8ac53ac9c76e85116965f1eef79e3f3e1f0451c8cf5ce0dfd6 diff --git a/sys-devel/mold/files/mold-2.32.1-libdl.patch b/sys-devel/mold/files/mold-2.32.1-libdl.patch new file mode 100644 index 000000000000..994137938b68 --- /dev/null +++ b/sys-devel/mold/files/mold-2.32.1-libdl.patch @@ -0,0 +1,20 @@ +https://github.com/rui314/mold/commit/091395df335d577adc2a09e854a129f02081c576 + +From 091395df335d577adc2a09e854a129f02081c576 Mon Sep 17 00:00:00 2001 +From: Rui Ueyama <ruiu@cs.stanford.edu> +Date: Fri, 28 Jun 2024 11:00:36 +0900 +Subject: [PATCH] Link with `-ldl` for dlopen() + +Fixes https://github.com/rui314/mold/issues/1293 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -61,6 +61,8 @@ target_compile_features(mold PRIVATE cxx_std_20) + + if(MINGW) + target_link_libraries(mold PRIVATE dl) ++else() ++ target_link_libraries(mold PRIVATE ${CMAKE_DL_LIBS}) + endif() + + if(NOT "${CMAKE_CXX_COMPILER_FRONTEND_VARIANT}" STREQUAL "MSVC") + diff --git a/sys-devel/mold/mold-2.32.1.ebuild b/sys-devel/mold/mold-2.32.1.ebuild new file mode 100644 index 000000000000..5c267ea9c1cb --- /dev/null +++ b/sys-devel/mold/mold-2.32.1.ebuild @@ -0,0 +1,103 @@ +# Copyright 2021-2024 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 ~arm ~arm64 ~loong ~riscv ~sparc ~x86" +fi + +# mold (MIT) +# - xxhash (BSD-2) +# - siphash ( MIT CC0-1.0 ) +LICENSE="MIT BSD-2 CC0-1.0" +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}"/${P}-libdl.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=( + -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_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 +} + +src_test() { + export TEST_CC="$(tc-getCC)" \ + TEST_GCC="$(tc-getCC)" \ + TEST_CXX="$(tc-getCXX)" \ + TEST_GXX="$(tc-getCXX)" + cmake_src_test +} |