diff options
| author | Stephen Allred | 2010-10-01 20:56:55 +0100 |
|---|---|---|
| committer | Adam Vandenberg | 2011-03-12 11:55:06 -0800 |
| commit | c19b32dfc409e39439f27c22f78a4cd1423e1a11 (patch) | |
| tree | ad048ce295d031009d9ee57475cea90e3328df99 /Library/Homebrew/extend | |
| parent | feed6a9ca25aa400c566d60c233337dc4e49b559 (diff) | |
| download | homebrew-c19b32dfc409e39439f27c22f78a4cd1423e1a11.tar.bz2 | |
Added --use-gcc flag.
This allows you to use llvm as your default compiler and keep the cc symlink
pointed at llvm, while allowing you to build forumla that requires the gcc.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Homebrew/extend')
| -rw-r--r-- | Library/Homebrew/extend/ENV.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb index bb2bbd544..fc4dc96ae 100644 --- a/Library/Homebrew/extend/ENV.rb +++ b/Library/Homebrew/extend/ENV.rb @@ -24,6 +24,10 @@ module HomebrewEnvExtension 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++' + cflags = ['-O3'] else # If these aren't set, many formulae fail to build self['CC'] = '/usr/bin/cc' |
