aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-10-27 23:59:47 -0500
committerJack Nagel2014-10-29 11:03:54 -0500
commitcb096605168aab687eb40e698fc5e1be853caf67 (patch)
treee9c362e65d78f711b1b9c3f13e844449780bbc9a /Library
parent6545e6dad3081baac176e1519206b2b9de7ff233 (diff)
downloadbrew-cb096605168aab687eb40e698fc5e1be853caf67.tar.bz2
Always set sysroot for Xcode-only systems
Fixes Homebrew/homebrew#33431.
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/ENV/4.3/cc4
-rw-r--r--Library/Homebrew/extend/ENV/super.rb10
2 files changed, 4 insertions, 10 deletions
diff --git a/Library/ENV/4.3/cc b/Library/ENV/4.3/cc
index 26468cdfa..42771a4d0 100755
--- a/Library/ENV/4.3/cc
+++ b/Library/ENV/4.3/cc
@@ -33,7 +33,7 @@ class Cmd
@args = args.freeze
@brewfix = ENV['HOMEBREW_PREFIX']
@brewtmp = ENV['HOMEBREW_TEMP']
- @sysroot = ENV['HOMEBREW_SYSROOT']
+ @sysroot = ENV['HOMEBREW_SDKROOT']
end
def mode
@@ -93,7 +93,7 @@ class Cmd
if tool == "ld"
args << "-syslibroot" << sysroot
else
- args << "--sysroot=#{sysroot}"
+ args << "-isysroot" << sysroot << "--sysroot=#{sysroot}"
end
end
diff --git a/Library/Homebrew/extend/ENV/super.rb b/Library/Homebrew/extend/ENV/super.rb
index 31718a2b9..cb3c12b33 100644
--- a/Library/Homebrew/extend/ENV/super.rb
+++ b/Library/Homebrew/extend/ENV/super.rb
@@ -46,7 +46,7 @@ module Superenv
self['HOMEBREW_BREW_FILE'] = HOMEBREW_BREW_FILE.to_s
self['HOMEBREW_PREFIX'] = HOMEBREW_PREFIX.to_s
self['HOMEBREW_TEMP'] = HOMEBREW_TEMP.to_s
- self['HOMEBREW_SDKROOT'] = "#{MacOS.sdk_path}" if MacOS::Xcode.without_clt?
+ self['HOMEBREW_SDKROOT'] = effective_sysroot
self['HOMEBREW_OPTFLAGS'] = determine_optflags
self['HOMEBREW_ARCHFLAGS'] = ''
self['CMAKE_PREFIX_PATH'] = determine_cmake_prefix_path
@@ -59,12 +59,6 @@ module Superenv
self["HOMEBREW_INCLUDE_PATHS"] = determine_include_paths
self["HOMEBREW_LIBRARY_PATHS"] = determine_library_paths
- # On 10.9 the developer tools honor the correct sysroot by default.
- # On 10.7 and 10.8 we need to set it ourselves.
- if MacOS::Xcode.without_clt? && (MacOS.version <= "10.8" || compiler != :clang)
- self["HOMEBREW_SYSROOT"] = effective_sysroot
- end
-
# On 10.9, the tools in /usr/bin proxy to the active developer directory.
# This means we can use them for any combination of CLT and Xcode.
self["HOMEBREW_PREFER_CLT_PROXIES"] = "1" if MacOS.version >= "10.9"
@@ -96,7 +90,7 @@ module Superenv
end
def effective_sysroot
- if MacOS::Xcode.without_clt? then MacOS.sdk_path.to_s else "" end
+ MacOS::Xcode.without_clt? ? MacOS.sdk_path.to_s : nil
end
def determine_cxx