aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorJack Nagel2011-12-26 12:03:55 -0600
committerJack Nagel2011-12-26 12:03:55 -0600
commitf437c9040b08d1950aeaedb8417e22752b285c25 (patch)
tree4e39edb73424dc5d2a97d4511710262d2f14bc4c /Library/Homebrew
parent33db0a966595ad407d1a048e073e156f3e8138f8 (diff)
downloadbrew-f437c9040b08d1950aeaedb8417e22752b285c25.tar.bz2
Resolve multi-level gcc symlinks
In later XCodes, gcc is a symlink to gcc-4.2 which is itself a symlink to llvm-gcc, so it is necessary to resolve multiple symlinks. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/extend/ENV.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb
index 9f9579109..b1ff5d9cf 100644
--- a/Library/Homebrew/extend/ENV.rb
+++ b/Library/Homebrew/extend/ENV.rb
@@ -90,8 +90,7 @@ module HomebrewEnvExtension
@compiler = :gcc
raise "GCC could not be found" if args[:force] and not File.exist? ENV['CC'] \
- or (File.symlink? ENV['CC'] \
- and File.readlink(ENV['CC']) =~ /llvm/)
+ or (Pathname.new(ENV['CC']).realpath.to_s =~ /llvm/)
end
alias_method :gcc_4_2, :gcc