diff options
Diffstat (limited to 'eclass/flag-o-matic.eclass')
-rw-r--r-- | eclass/flag-o-matic.eclass | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass index 9ef9ac3685e0..d8111fb9e38f 100644 --- a/eclass/flag-o-matic.eclass +++ b/eclass/flag-o-matic.eclass @@ -487,11 +487,15 @@ test-flag-PROG() { printf "%s\n" "${in_src}" > "${test_in}" || die "Failed to create '${test_in}'" + # Don't set -Werror as there are cases when benign + # always-on warnings filter out all flags like bug #712488. + # We'll have to live with potential '-Wunused-command-line-argument'. + # flags. + # + # We can add more selective detection of no-op flags via + # '-Werror=ignored-optimization-argument' and similar error options. local cmdline=( "${comp[@]}" - # Clang will warn about unknown gcc flags but exit 0. - # Need -Werror to force it to exit non-zero. - -Werror "$@" # -x<lang> options need to go before first source file "${cmdline_extra[@]}" @@ -499,14 +503,7 @@ test-flag-PROG() { "${test_in}" -o "${test_out}" ) - if ! "${cmdline[@]}" &>/dev/null; then - # -Werror makes clang bail out on unused arguments as well; - # try to add -Qunused-arguments to work-around that - # other compilers don't support it but then, it's failure like - # any other - cmdline+=( -Qunused-arguments ) - "${cmdline[@]}" &>/dev/null - fi + "${cmdline[@]}" &>/dev/null } # @FUNCTION: test-flag-CC |