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
|
@compiler = :gcc
|
||||||
|
|
||||||
raise "GCC could not be found" if args[:force] and not File.exist? ENV['CC'] \
|
raise "GCC could not be found" if args[:force] and not File.exist? ENV['CC'] \
|
||||||
or (File.symlink? ENV['CC'] \
|
or (Pathname.new(ENV['CC']).realpath.to_s =~ /llvm/)
|
||||||
and File.readlink(ENV['CC']) =~ /llvm/)
|
|
||||||
end
|
end
|
||||||
alias_method :gcc_4_2, :gcc
|
alias_method :gcc_4_2, :gcc
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user