Don't try and use GCC on Xcode 4.2: it's gone Jim.
Closes Homebrew/homebrew#9622. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
c28779d4e0
commit
555e7ff893
@ -103,7 +103,7 @@ module HomebrewEnvExtension
|
|||||||
@compiler = :llvm
|
@compiler = :llvm
|
||||||
end
|
end
|
||||||
|
|
||||||
def clang
|
def clang args = {}
|
||||||
self['CC'] = "/usr/bin/clang"
|
self['CC'] = "/usr/bin/clang"
|
||||||
self['CXX'] = "/usr/bin/clang++"
|
self['CXX'] = "/usr/bin/clang++"
|
||||||
replace_in_cflags(/-Xarch_i386 (-march=\S*)/, '\1')
|
replace_in_cflags(/-Xarch_i386 (-march=\S*)/, '\1')
|
||||||
|
|||||||
@ -339,8 +339,13 @@ class Formula
|
|||||||
# latest version we have tested against so we will switch to GCC and
|
# 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!
|
# bump this integer when Xcode 4.3 is released. TODO do that!
|
||||||
if llvm.build.to_i >= 2336
|
if llvm.build.to_i >= 2336
|
||||||
|
if MacOS.xcode_version < "4.2"
|
||||||
opoo "Formula will not build with LLVM, using GCC"
|
opoo "Formula will not build with LLVM, using GCC"
|
||||||
ENV.gcc :force => true
|
ENV.gcc :force => true
|
||||||
|
else
|
||||||
|
opoo "Formula will not build with LLVM, trying Clang"
|
||||||
|
ENV.clang :force => true
|
||||||
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
opoo "Building with LLVM, but this formula is reported to not work with LLVM:"
|
opoo "Building with LLVM, but this formula is reported to not work with LLVM:"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user