summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Smith <matthew@gentoo.org>2023-12-05 13:35:44 +0000
committerMatthew Smith <matthew@gentoo.org>2023-12-05 13:37:53 +0000
commit29cae3c5271e8d00a524258fa7226b6694def2dd (patch)
treeb0768623e885ae346c6b0eafc04240213f97cc23 /sys-devel/mold
parentsys-kernel/installkernel-systemd: mark ALLARCHES (diff)
downloadgentoo-29cae3c5271e8d00a524258fa7226b6694def2dd.tar.gz
gentoo-29cae3c5271e8d00a524258fa7226b6694def2dd.tar.bz2
gentoo-29cae3c5271e8d00a524258fa7226b6694def2dd.zip
sys-devel/mold: set TEST_$TOOL env for tests
Use the configured compiler instead of invoking cc directly when running tests. Closes: https://bugs.gentoo.org/918967 Signed-off-by: Matthew Smith <matthew@gentoo.org>
Diffstat (limited to 'sys-devel/mold')
-rw-r--r--sys-devel/mold/mold-2.4.0.ebuild8
-rw-r--r--sys-devel/mold/mold-9999.ebuild8
2 files changed, 16 insertions, 0 deletions
diff --git a/sys-devel/mold/mold-2.4.0.ebuild b/sys-devel/mold/mold-2.4.0.ebuild
index d1954b0e0a9d..52d41ed470e9 100644
--- a/sys-devel/mold/mold-2.4.0.ebuild
+++ b/sys-devel/mold/mold-2.4.0.ebuild
@@ -93,3 +93,11 @@ src_install() {
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
+}
diff --git a/sys-devel/mold/mold-9999.ebuild b/sys-devel/mold/mold-9999.ebuild
index 2b9db9efa079..2820eb765997 100644
--- a/sys-devel/mold/mold-9999.ebuild
+++ b/sys-devel/mold/mold-9999.ebuild
@@ -93,3 +93,11 @@ src_install() {
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
+}