Fix more 10.x hardcodings.

This commit is contained in:
Mike McQuaid 2020-06-23 17:10:07 +01:00
parent fbf56e27a0
commit 6f1970fd24
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70
2 changed files with 3 additions and 3 deletions

View File

@ -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"

View File

@ -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/