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>
This commit is contained in:
parent
33db0a9665
commit
f437c9040b
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user