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>
This commit is contained in:
Matthew Smith
2023-12-05 13:37:53 +00:00
parent 2fcd8dc37c
commit 29cae3c527
2 changed files with 16 additions and 0 deletions
+8
View File
@@ -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
}
+8
View File
@@ -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
}