summaryrefslogtreecommitdiff
path: root/eclass/toolchain.eclass
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/toolchain.eclass')
-rw-r--r--eclass/toolchain.eclass12
1 files changed, 12 insertions, 0 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 9bbe0cb7e0af..89af435dfbf6 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1927,6 +1927,13 @@ toolchain_src_test() {
# Unexpected warnings confuse the tests.
filter-flags -W*
+ # May break parsing.
+ filter-flags '-fdiagnostics-color=*' '-fdiagnostics-urls=*'
+
+ # Gentoo QA flags which don't belong in tests
+ filter-flags -frecord-gcc-switches
+ filter-flags '-Wl,--defsym=__gentoo_check_ldflags__=0'
+
# Workaround our -Wformat-security default which breaks
# various tests as it adds unexpected warning output.
# (Only for C/C++ here to avoid noise for Fortran.)
@@ -1956,7 +1963,12 @@ toolchain_src_test() {
# Go doesn't support this and causes noisy warnings
filter-flags -Wbuiltin-declaration-mismatch
+ # configure defaults to '-O2 -g' and some tests expect it
+ # accordingly.
+ append-flags -g
+
# TODO: Does this handle s390 (-m31) correctly?
+ # TODO: What if there are multiple ABIs like x32 too?
is_multilib && GCC_TESTS_RUNTESTFLAGS+=" --target_board=unix{,-m32}"
# nonfatal here as we die if the comparison below fails. Also, note that