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?