toolchain.eclass: filter out -Wextra -Wstack-protector
authorSergei Trofimovich <slyfox@gentoo.org>
Sat, 6 Oct 2018 09:13:14 +0000 (10:13 +0100)
committerSergei Trofimovich <slyfox@gentoo.org>
Sat, 6 Oct 2018 09:25:03 +0000 (10:25 +0100)
On gcc-3.x -Wextra -Wstack-protector were not yet present.
These options are seen occasionally in users' CFLAGS.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
eclass/toolchain.eclass

index e2629d40393d555092865350902cbe23feded271..0e44d922ebe679cb347028c666c49ace2793fda9 100644 (file)
@@ -1507,6 +1507,8 @@ gcc_do_filter_flags() {
                filter-flags -f{no-,}unit-at-a-time -f{no-,}web -mno-tls-direct-seg-refs
                filter-flags -f{no-,}stack-protector{,-all}
                filter-flags -fvisibility-inlines-hidden -fvisibility=hidden
+               # and warning options
+               filter-flags -Wextra -Wstack-protector
        fi
        if ! tc_version_is_at_least 4.1 ; then
                filter-flags -fdiagnostics-show-option