diff options
| author | Mike McQuaid | 2016-07-28 16:49:08 -0600 |
|---|---|---|
| committer | Mike McQuaid | 2016-07-29 17:00:51 -0600 |
| commit | b999edb3448793529aea8b29c01b3851bbc3b3eb (patch) | |
| tree | ce9a0614896c224cf2f7ec9a01d5bc27fc5ca383 /Library | |
| parent | 209d9e8a6eaad3b554f825dbefbfa7e37e20e006 (diff) | |
| download | brew-b999edb3448793529aea8b29c01b3851bbc3b3eb.tar.bz2 | |
link: don't link /usr/local openssl.
See https://langui.sh/2015/07/24/osx-clang-include-lib-search-paths/ for
an explanation and https://gist.github.com/tdsmith/4b502c5cc6e7d358acdf
for reproduction instructions.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/link.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/link.rb b/Library/Homebrew/cmd/link.rb index f4ef16e8a..d7ea2427c 100644 --- a/Library/Homebrew/cmd/link.rb +++ b/Library/Homebrew/cmd/link.rb @@ -24,7 +24,16 @@ module Homebrew mode.dry_run = true if ARGV.dry_run? ARGV.kegs.each do |keg| - if keg.linked? + if HOMEBREW_PREFIX.to_s == "/usr/local" && keg.name == "openssl" + opoo <<-EOS.undent + Refusing to link: openssl + Linking keg-only OpenSSL means you may end up linking against the insecure, + deprecated system version while using the headers from the Homebrew version. + Instead, pass the full include/library paths to your compiler e.g.: + -I#{HOMEBREW_PREFIX}/opt/openssl/include -L#{HOMEBREW_PREFIX}/opt/openssl/lib + EOS + next + elsif keg.linked? opoo "Already linked: #{keg}" puts "To relink: brew unlink #{keg.name} && brew link #{keg.name}" next |
