diff --git a/Library/Homebrew/extend/os/mac/extend/ENV/std.rb b/Library/Homebrew/extend/os/mac/extend/ENV/std.rb index ae04e62a8d..11287c3167 100644 --- a/Library/Homebrew/extend/os/mac/extend/ENV/std.rb +++ b/Library/Homebrew/extend/os/mac/extend/ENV/std.rb @@ -52,7 +52,7 @@ module Stdenv def remove_macosxsdk(version = nil) # Clear all lib and include dirs from CFLAGS, CPPFLAGS, LDFLAGS that were # previously added by macosxsdk - remove_from_cflags(/ ?-mmacosx-version-min=10\.\d+/) + remove_from_cflags(/ ?-mmacosx-version-min=\d+\.\d+/) delete("CPATH") remove "LDFLAGS", "-L#{HOMEBREW_PREFIX}/lib" diff --git a/Library/Homebrew/os/mac.rb b/Library/Homebrew/os/mac.rb index 654f2d5c04..f559bfacf9 100644 --- a/Library/Homebrew/os/mac.rb +++ b/Library/Homebrew/os/mac.rb @@ -21,7 +21,7 @@ module OS # This can be compared to numerics, strings, or symbols # using the standard Ruby Comparable methods. def version - @version ||= Version.new(full_version.to_s[/10\.\d+/]) + @version ||= Version.new(full_version.to_s[/^\d+\.\d+/]) end # This can be compared to numerics, strings, or symbols diff --git a/Library/Homebrew/shims/super/cc b/Library/Homebrew/shims/super/cc index b6249a04f4..4462deae26 100755 --- a/Library/Homebrew/shims/super/cc +++ b/Library/Homebrew/shims/super/cc @@ -188,8 +188,8 @@ class Cmd when "-Xpreprocessor", "-Xclang" # used for -Xpreprocessor -fopenmp args << arg << enum.next - when /-mmacosx-version-min=10\.(\d+)/ - arg = "-mmacosx-version-min=10.9" if high_sierra_or_later? && $1.to_i < 9 + when /-mmacosx-version-min=(\d+)\.(\d+)/ + arg = "-mmacosx-version-min=10.9" if high_sierra_or_later? && $1 == "10" && $2.to_i < 9 args << arg when "--fast-math" arg = "-ffast-math" if tool =~ /^clang/