aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Formula/gmp.rb2
-rw-r--r--Library/Homebrew/xcode.rb4
2 files changed, 5 insertions, 1 deletions
diff --git a/Library/Formula/gmp.rb b/Library/Formula/gmp.rb
index e09489d6b..d710591a2 100644
--- a/Library/Formula/gmp.rb
+++ b/Library/Formula/gmp.rb
@@ -19,7 +19,7 @@ class Gmp < Formula
# Also force use of 4.2 on 10.6 in case a user has changed the default
# Do not force if xcode > 4.2 since it does not have /usr/bin/gcc-4.2 as default
# FIXME convert this to appropriate fails_with annotations
- ENV.gcc unless MacOS::Xcode.version >= '4.2'
+ ENV.gcc if MacOS::Xcode.provides_gcc?
args = %W[--prefix=#{prefix} --enable-cxx]
diff --git a/Library/Homebrew/xcode.rb b/Library/Homebrew/xcode.rb
index 74c5fbd9f..ab3062ed0 100644
--- a/Library/Homebrew/xcode.rb
+++ b/Library/Homebrew/xcode.rb
@@ -122,6 +122,10 @@ module MacOS::Xcode extend self
def provides_autotools?
version.to_f < 4.3
end
+
+ def provides_gcc?
+ version.to_f < 4.3
+ end
end
module MacOS::CLT extend self