superenv: filter flags for older GCCs

Fixes mistydemeo/tigerbrew#371.
Fixes Homebrew/homebrew#47949.
This commit is contained in:
Misty De Meo 2016-01-11 22:23:33 -04:00
parent 9810c2a412
commit 256aea180a

View File

@ -149,6 +149,9 @@ class Cmd
"-fuse-linker-plugin" "-fuse-linker-plugin"
# clang doesn't support these flags # clang doesn't support these flags
args << arg unless tool =~ /^clang/ args << arg unless tool =~ /^clang/
when "-Wno-deprecated-register"
# older gccs don't support these flags
args << arg unless tool =~ /^gcc-4.[02]/
when /^-W[alp],/, /^-Wno-/ when /^-W[alp],/, /^-Wno-/
args << arg args << arg
when /^-W.*/ when /^-W.*/