Permalink
Browse files

Don't try and use GCC on Xcode 4.2: it's gone Jim.

Closes #9622.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
  • Loading branch information...
1 parent 1e98594 commit 28c20b387b5bc6a7283906fa961056362cc3f98e @MikeMcQuaid MikeMcQuaid committed Jan 16, 2012
Showing with 8 additions and 3 deletions.
  1. +1 −1 Library/Homebrew/extend/ENV.rb
  2. +7 −2 Library/Homebrew/formula.rb
@@ -103,7 +103,7 @@ def llvm
@compiler = :llvm
end
- def clang
+ def clang args = {}
self['CC'] = "/usr/bin/clang"
self['CXX'] = "/usr/bin/clang++"
replace_in_cflags(/-Xarch_i386 (-march=\S*)/, '\1')
@@ -339,8 +339,13 @@ def handle_llvm_failure llvm
# latest version we have tested against so we will switch to GCC and
# bump this integer when Xcode 4.3 is released. TODO do that!
if llvm.build.to_i >= 2336
- opoo "Formula will not build with LLVM, using GCC"
- ENV.gcc :force => true
+ if MacOS.xcode_version < "4.2"
+ opoo "Formula will not build with LLVM, using GCC"
+ ENV.gcc :force => true
+ else
+ opoo "Formula will not build with LLVM, trying Clang"
+ ENV.clang :force => true
+ end
return
end
opoo "Building with LLVM, but this formula is reported to not work with LLVM:"

0 comments on commit 28c20b3

Please sign in to comment.