toolchain.eclass: filter out -fdiagnostics-show-option on gcc-4.0 and older
authorSergei Trofimovich <slyfox@gentoo.org>
Sun, 16 Sep 2018 15:53:43 +0000 (16:53 +0100)
committerSergei Trofimovich <slyfox@gentoo.org>
Sun, 16 Sep 2018 16:52:13 +0000 (17:52 +0100)
-fdiagnostics-show-option was added in gcc-4.1.0.

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

index 6e859993397ca26e4bf85f207e91318bc3ecc799..ef0d7ab1f99925f401ebfd5f66122dc75103a10d 100644 (file)
@@ -1508,6 +1508,9 @@ gcc_do_filter_flags() {
                filter-flags -f{no-,}stack-protector{,-all}
                filter-flags -fvisibility-inlines-hidden -fvisibility=hidden
        fi
+       if ! tc_version_is_at_least 4.1 ; then
+               filter-flags -fdiagnostics-show-option
+       fi
 
        if tc_version_is_at_least 3.4 ; then
                case $(tc-arch) in