From 8f068fdbca362a48e4142be4500ccffe0f97392d Mon Sep 17 00:00:00 2001 From: "Tim D. Smith" Date: Wed, 31 Aug 2016 22:38:18 -0700 Subject: [PATCH] Don't reject -L/usr/local/lib when SDKROOT is defined /usr/local/lib is removed from the default linker search path when SDKROOT is defined or sysroot is specified. Homebrew sometimes sets SDKROOT without setting a sysroot as of 45e138f. --- Library/Homebrew/shims/super/cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/shims/super/cc b/Library/Homebrew/shims/super/cc index 10b39bde2c..ea602f1f99 100755 --- a/Library/Homebrew/shims/super/cc +++ b/Library/Homebrew/shims/super/cc @@ -279,7 +279,9 @@ class Cmd end def system_library_paths - %W[#{sysroot}/usr/lib /usr/local/lib] + paths = ["#{sysroot}/usr/lib"] + paths << "/usr/local/lib" unless sysroot || ENV["SDKROOT"] + paths end def configure?