Skip to content

Commit 1d7aa1f

Browse files
committed
superenv: help Autotools with 10.12 SDK on 10.11
The GNU Autotools tests for whether a given symbol is defined are reliably coming to incorrect conclusions on 10.11 with the 10.12 SDK in Xcode 8. This overrides its decisions by forcing the right answer in superenv using ac_cv_func_* environment variables and setting them to "no" on 10.11. The list of problematic symbols is from grep 'weak$os10.11' MacOSX.sdk/usr/lib/system/libsystem_c.tbd
1 parent e02962f commit 1d7aa1f

File tree

1 file changed

+9
-0
lines changed
  • Library/Homebrew/extend/os/mac/extend/ENV

1 file changed

+9
-0
lines changed

Library/Homebrew/extend/os/mac/extend/ENV/super.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,15 @@ def setup_build_environment(formula = nil)
9494
self["SDKROOT"] = MacOS.sdk_path
9595
end
9696

97+
# Filter out symbols known not to be defined on 10.11 since GNU Autotools
98+
# can't reliably figure this out with Xcode 8 on its own yet.
99+
if MacOS.version == "10.11" && MacOS::Xcode.installed? && MacOS::Xcode.version >= "8.0"
100+
%w[basename_r clock_getres clock_gettime clock_settime dirname_r
101+
getentropy mkostemp mkostemps].each do |s|
102+
ENV["ac_cv_func_#{s}"] = "no"
103+
end
104+
end
105+
97106
# On 10.9, the tools in /usr/bin proxy to the active developer directory.
98107
# This means we can use them for any combination of CLT and Xcode.
99108
self["HOMEBREW_PREFER_CLT_PROXIES"] = "1" if MacOS.version >= "10.9"

0 commit comments

Comments
 (0)