diff --git a/Library/Homebrew/extend/ENV/std.rb b/Library/Homebrew/extend/ENV/std.rb index f6f09a9f13..bd3c288757 100644 --- a/Library/Homebrew/extend/ENV/std.rb +++ b/Library/Homebrew/extend/ENV/std.rb @@ -293,7 +293,7 @@ def cxx11 if compiler == :clang append "CXX", "-std=c++11" append "CXX", "-stdlib=libc++" - elsif compiler =~ /gcc-(4\.(8|9)|5)/ + elsif compiler =~ /gcc-(4\.(8|9)|[5-9]|[0-9]{2})/ append "CXX", "-std=c++11" else raise "The selected compiler doesn't support C++11: #{compiler}" diff --git a/Library/Homebrew/extend/ENV/super.rb b/Library/Homebrew/extend/ENV/super.rb index e3abc4b717..0b002bee3e 100644 --- a/Library/Homebrew/extend/ENV/super.rb +++ b/Library/Homebrew/extend/ENV/super.rb @@ -293,7 +293,7 @@ def cxx11 when "clang" append "HOMEBREW_CCCFG", "x", "" append "HOMEBREW_CCCFG", "g", "" - when /gcc-(4\.(8|9)|5)/ + when /gcc-(4\.(8|9)|[5-9]|[0-9]{2})/ append "HOMEBREW_CCCFG", "x", "" else raise "The selected compiler doesn't support C++11: #{homebrew_cc}"