Skip to content

Commit

Permalink
Merge pull request #7809 from Bo98/macos-version-11
Browse files Browse the repository at this point in the history
os/mac: fix for major versions other than 10
  • Loading branch information
Bo98 committed Jun 23, 2020
2 parents 4fa540b + 6f1970f commit 9788735
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Library/Homebrew/extend/os/mac/extend/ENV/std.rb
Expand Up @@ -52,7 +52,7 @@ def setup_build_environment(formula = nil)
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"

Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/os/mac.rb
Expand Up @@ -21,7 +21,7 @@ module Mac
# 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
Expand Down
4 changes: 2 additions & 2 deletions Library/Homebrew/shims/super/cc
Expand Up @@ -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/
Expand Down

0 comments on commit 9788735

Please sign in to comment.