diff options
Diffstat (limited to 'eclass/toolchain.eclass')
-rw-r--r-- | eclass/toolchain.eclass | 49 |
1 files changed, 27 insertions, 22 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index b2d4692bc2e1..326daf66586c 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1941,15 +1941,19 @@ toolchain_src_test() { # Workaround our -Wformat-security default which breaks # various tests as it adds unexpected warning output. - append-flags -Wno-format-security -Wno-format + GCC_TESTS_CFLAGS+=" -Wno-format-security -Wno-format" + GCC_TESTS_CXXFLAGS+=" -Wno-format-security -Wno-format" + # Workaround our -Wtrampolines default which breaks # tests too. - append-flags -Wno-trampolines + GCC_TESTS_CFLAGS+=" -Wno-trampolines" + GCC_TESTS_CXXFLAGS+=" -Wno-trampolines" # A handful of Ada (and objc++?) tests need an executable stack - append-ldflags -Wl,--no-warn-execstack + GCC_TESTS_LDFLAGS+=" -Wl,--no-warn-execstack" # Avoid confusing tests like Fortran/C interop ones where # CFLAGS are used. - append-flags -Wno-complain-wrong-lang + GCC_TESTS_CFLAGS+=" -Wno-complain-wrong-lang" + GCC_TESTS_CXXFLAGS+=" -Wno-complain-wrong-lang" # Issues with Ada tests: # gnat.dg/align_max.adb @@ -1960,11 +1964,12 @@ toolchain_src_test() { # # TODO: This isn't ideal given it obv. affects codegen # and we want to be sure it works. - append-flags -fno-stack-clash-protection + GCC_TESTS_CFLAGS+=" -fno-stack-clash-protection" + GCC_TESTS_CXXFLAGS+=" -fno-stack-clash-protection" # configure defaults to '-O2 -g' and some tests expect it # accordingly. - append-flags -g + GCC_TESTS_CFLAGS+=" -g" # TODO: Does this handle s390 (-m31) correctly? # TODO: What if there are multiple ABIs like x32 too? @@ -1980,23 +1985,23 @@ toolchain_src_test() { 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}' \ + CFLAGS_FOR_TARGET='${GCC_TESTS_CFLAGS_FOR_TARGET:-${GCC_TESTS_CFLAGS}}' \ + CXXFLAGS_FOR_TARGET='${GCC_TESTS_CXXFLAGS_FOR_TARGET:-${GCC_TESTS_CXXFLAGS}}' \ + LDFLAGS_FOR_TARGET='${TEST_LDFLAGS_FOR_TARGET:-${GCC_TESTS_LDFLAGS}}' \ + CFLAGS='${GCC_TESTS_CFLAGS}' \ + CXXFLAGS='${GCC_TESTS_CXXFLAGS}' \ + FCFLAGS='${GCC_TESTS_FCFLAGS}' \ + FFLAGS='${GCC_TESTS_FFLAGS}' \ + LDFLAGS='${GCC_TESTS_LDFLAGS}' \ " \ - 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}" + CFLAGS_FOR_TARGET="${GCC_TESTS_CFLAGS_FOR_TARGET:-${GCC_TESTS_CFLAGS}}" \ + CXXFLAGS_FOR_TARGET="${GCC_TESTS_CXXFLAGS_FOR_TARGET:-${GCC_TESTS_CXXFLAGS}}" \ + LDFLAGS_FOR_TARGET="${GCC_TESTS_LDFLAGS_FOR_TARGET:-${GCC_TESTS_LDFLAGS}}" \ + CFLAGS="${GCC_TESTS_CFLAGS}" \ + CXXFLAGS="${GCC_TESTS_CXXFLAGS}" \ + FCFLAGS="${GCC_TESTS_FCFLAGS}" \ + FFLAGS="${GCC_TESTS_FFLAGS}" \ + LDFLAGS="${GCC_TESTS_LDFLAGS}" ) # Produce an updated failure manifest. |