diff options
author | Sam James <sam@gentoo.org> | 2024-08-07 16:08:06 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-08-07 16:13:01 +0100 |
commit | 5ca076594ad47b8347ebc9fd69b467a95846d005 (patch) | |
tree | c6caef6e59018e3c7b419b34b6c11099a56284be /eclass | |
parent | www-client/chromium: add 127.0.6533.99 (diff) | |
download | gentoo-5ca076594ad47b8347ebc9fd69b467a95846d005.tar.gz gentoo-5ca076594ad47b8347ebc9fd69b467a95846d005.tar.bz2 gentoo-5ca076594ad47b8347ebc9fd69b467a95846d005.zip |
toolchain.eclass: another attempt at flag filtering for tests
The previous method ends up confusing D because those flags don't work
there...
Try passing *FLAGS into RUNTESTFLAGS this time, like in
https://gcc.gnu.org/wiki/Testing_GCC#Testing_a_different_target_from_the_current_host.
This reverts commit 7eab20a224f411ef2660f4fecae22e28cad711e7 and
commit f66787897a590b8c949d257e3a9107f8995f62ae.
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/toolchain.eclass | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index e81116973c67..550845b7dd47 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1947,24 +1947,25 @@ toolchain_src_test() { # Go doesn't support this and causes noisy warnings filter-flags -Wbuiltin-declaration-mismatch - local suppress_warn="/-Wno-format/-Wno-format-security/-Wno-trampolines" - GCC_TESTS_RUNTESTFLAGS+=" --target_board=unix\{${suppress_warn}" # TODO: Does this handle s390 (-m31) correctly? - is_multilib && GCC_TESTS_RUNTESTFLAGS+=",-m32/${suppress_warn}" - GCC_TESTS_RUNTESTFLAGS+="\}" + is_multilib && GCC_TESTS_RUNTESTFLAGS+=" --target_board=unix\{,-m32\}" + + GCC_TESTS_RUNTESTFLAGS=( + "${GCC_TESTS_RUNTESTFLAGS}" + CFLAGS_FOR_TARGET="${CFLAGS_FOR_TARGET:-${CFLAGS}}" + CXXFLAGS_FOR_TARGET="${CXXFLAGS_FOR_TARGET:-${CXXFLAGS}}" + LDFLAGS_FOR_TARGET="${LDFLAGS_FOR_TARGET:-${LDFLAGS}}" + CFLAGS="${CFLAGS}" + CXXFLAGS="${CXXFLAGS}" + FCFLAGS="${FCFLAGS}" + FFLAGS="${FFLAGS}" + LDFLAGS="${LDFLAGS}" + ) # nonfatal here as we die if the comparison below fails. Also, note that # the exit code of targets other than 'check' may be unreliable. nonfatal emake -C "${WORKDIR}"/build -k "${GCC_TESTS_CHECK_TARGET}" \ - RUNTESTFLAGS="${GCC_TESTS_RUNTESTFLAGS}" \ - CFLAGS_FOR_TARGET="${CFLAGS_FOR_TARGET:-${CFLAGS}}" \ - CXXFLAGS_FOR_TARGET="${CXXFLAGS_FOR_TARGET:-${CXXFLAGS}}" \ - LDFLAGS_FOR_TARGET="${LDFLAGS_FOR_TARGET:-${LDFLAGS}}" \ - CFLAGS="${CFLAGS}" \ - CXXFLAGS="${CXXFLAGS}" \ - FCFLAGS="${FCFLAGS}" \ - FFLAGS="${FFLAGS}" \ - LDFLAGS="${LDFLAGS}" + RUNTESTFLAGS="${GCC_TESTS_RUNTESTFLAGS[*]}" ) # Produce an updated failure manifest. |