aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2011-03-17 17:21:42 +0000
committerMike McQuaid2011-03-17 17:21:42 +0000
commitec0ae5ee99e4b9e2de2917cced0741c51e2719ac (patch)
treede517e1d00ca71fae17f2a60ab06efce1e34dd65 /Library
parente68a4d3e373b01c13c81fbfc4c173642b84cd5b4 (diff)
downloadbrew-ec0ae5ee99e4b9e2de2917cced0741c51e2719ac.tar.bz2
Use xcode_path for GCC as well as LLVM.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/ENV.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb
index f5a61faa5..f0e2364ab 100644
--- a/Library/Homebrew/extend/ENV.rb
+++ b/Library/Homebrew/extend/ENV.rb
@@ -18,15 +18,15 @@ module HomebrewEnvExtension
self['CMAKE_PREFIX_PATH'] = "#{HOMEBREW_PREFIX}"
end
+ xcode_path = `/usr/bin/xcode-select -print-path`.chomp
+ xcode_path = "/Developer" if xcode_path.to_s.empty?
if MACOS_VERSION >= 10.6 and (self['HOMEBREW_USE_LLVM'] or ARGV.include? '--use-llvm')
- xcode_path = `/usr/bin/xcode-select -print-path`.chomp
- xcode_path = "/Developer" if xcode_path.to_s.empty?
self['CC'] = "#{xcode_path}/usr/bin/llvm-gcc"
self['CXX'] = "#{xcode_path}/usr/bin/llvm-g++"
cflags = ['-O4'] # link time optimisation baby!
elsif MACOS_VERSION >= 10.6 and (self['HOMEBREW_USE_GCC'] or ARGV.include? '--use-gcc')
- self['CC'] = '/usr/bin/gcc'
- self['CXX'] = '/usr/bin/g++'
+ self['CC'] = "#{xcode_path}/usr/bin/gcc"
+ self['CXX'] = "#{xcode_path}/usr/bin/g++"
cflags = ['-O3']
else
# If these aren't set, many formulae fail to build