commit:     9fa96122168910e8422055ef4953ce864fe77f0c
Author:     Matthew Smith <matthew <AT> gentoo <DOT> org>
AuthorDate: Tue Mar  8 19:53:18 2022 +0000
Commit:     Matthew Smith <matthew <AT> gentoo <DOT> org>
CommitDate: Tue Mar  8 19:53:58 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9fa96122

sys-devel/mold: Enable tests

Signed-off-by: Matthew Smith <matthew <AT> gentoo.org>

 sys-devel/mold/mold-1.1.1.ebuild | 14 ++++++++++----
 sys-devel/mold/mold-9999.ebuild  | 14 ++++++++++----
 2 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/sys-devel/mold/mold-1.1.1.ebuild b/sys-devel/mold/mold-1.1.1.ebuild
index 351ef38c6b51..5ea54e0926db 100644
--- a/sys-devel/mold/mold-1.1.1.ebuild
+++ b/sys-devel/mold/mold-1.1.1.ebuild
@@ -18,10 +18,6 @@ fi
 LICENSE="AGPL-3"
 SLOT="0"
 
-# Try again after 1.0 (nearly there, but path-related issues)
-# https://github.com/rui314/mold/issues/137
-RESTRICT="test"
-
 RDEPEND=">=dev-cpp/tbb-2021.4.0:=
        sys-libs/zlib
        !kernel_Darwin? (
@@ -48,6 +44,16 @@ src_prepare() {
 
        # Needs unpackaged dwarfdump
        rm test/elf/{compress-debug-sections,compressed-debug-info}.sh || die
+
+       # Sandbox sadness
+       rm test/elf/run.sh || die
+       sed -i 's|$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/{hello,ifunc}-static-pie.sh || die
+       fi
 }
 
 src_compile() {

diff --git a/sys-devel/mold/mold-9999.ebuild b/sys-devel/mold/mold-9999.ebuild
index 351ef38c6b51..5ea54e0926db 100644
--- a/sys-devel/mold/mold-9999.ebuild
+++ b/sys-devel/mold/mold-9999.ebuild
@@ -18,10 +18,6 @@ fi
 LICENSE="AGPL-3"
 SLOT="0"
 
-# Try again after 1.0 (nearly there, but path-related issues)
-# https://github.com/rui314/mold/issues/137
-RESTRICT="test"
-
 RDEPEND=">=dev-cpp/tbb-2021.4.0:=
        sys-libs/zlib
        !kernel_Darwin? (
@@ -48,6 +44,16 @@ src_prepare() {
 
        # Needs unpackaged dwarfdump
        rm test/elf/{compress-debug-sections,compressed-debug-info}.sh || die
+
+       # Sandbox sadness
+       rm test/elf/run.sh || die
+       sed -i 's|$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/{hello,ifunc}-static-pie.sh || die
+       fi
 }
 
 src_compile() {

Reply via email to