Merge pull request #7809 from Bo98/macos-version-11
os/mac: fix for major versions other than 10
This commit is contained in:
commit
9788735eb2
@ -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"
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user