commit:     ce970065ce97dd5e8b303ca639519595d080ef9e
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 16 15:53:43 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Sep 16 16:52:13 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce970065

toolchain.eclass: filter out -fdiagnostics-show-option on gcc-4.0 and older

-fdiagnostics-show-option was added in gcc-4.1.0.

Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 eclass/toolchain.eclass | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 6e859993397..ef0d7ab1f99 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -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

Reply via email to