diff options
| author | Misty De Meo | 2013-01-22 18:28:13 -0600 |
|---|---|---|
| committer | Misty De Meo | 2013-01-26 22:57:56 -0600 |
| commit | eb80cd17bc6fd709432b55d2c0079377b1687249 (patch) | |
| tree | df7d941442cba40f55260e932ee39b19f5f6faae /Library/Homebrew | |
| parent | 032bfcdd8528b68305523c56c38fa98153c3d58c (diff) | |
| download | homebrew-eb80cd17bc6fd709432b55d2c0079377b1687249.tar.bz2 | |
superenv: --use-gcc should specify gcc-4.2
Since 'gcc' is a symlink to 'llvm-gcc' on Xcode 4.3+, --use-gcc and
--use-llvm were doing exactly the same thing. Combined with the
previous commit, this allows users with either a leftover
/usr/bin/gcc-4.2 or a homebrewed apple-gcc42 to build with gcc.
This doesn't however fix Xcode-only systems with apple-gcc42.
Fixes #17243.
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/superenv.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Library/Homebrew/superenv.rb b/Library/Homebrew/superenv.rb index 0e8c3789e..79e8a396b 100644 --- a/Library/Homebrew/superenv.rb +++ b/Library/Homebrew/superenv.rb @@ -77,7 +77,8 @@ class << ENV def determine_cc if ARGV.include? '--use-gcc' - "gcc" + # fall back to something else on systems without Apple gcc + MacOS.locate('gcc-4.2') ? "gcc-4.2" : raise("gcc-4.2 not found!") elsif ARGV.include? '--use-llvm' "llvm-gcc" elsif ARGV.include? '--use-clang' @@ -219,6 +220,7 @@ class << ENV def compiler case ENV['HOMEBREW_CC'] when "llvm-gcc" then :llvm + when "gcc-4.2" then :gcc when "gcc", "clang" then ENV['HOMEBREW_CC'].to_sym else raise |
