aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils.rb
diff options
context:
space:
mode:
authorCamillo Lugaresi2011-03-16 02:46:46 +0100
committerMike McQuaid2011-03-17 17:49:14 +0000
commit22afb1cc43b9999afb77d9d9d221d00683b6f116 (patch)
treec55e995bd8f40a000220cd772f55910983308e64 /Library/Homebrew/utils.rb
parentec0ae5ee99e4b9e2de2917cced0741c51e2719ac (diff)
downloadbrew-22afb1cc43b9999afb77d9d9d221d00683b6f116.tar.bz2
make fails_with_llvm work when cc is llvm-gcc
Closes Homebrew/homebrew#4693. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Homebrew/utils.rb')
-rw-r--r--Library/Homebrew/utils.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index fa08f8759..bd33f8640 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -1,3 +1,5 @@
+require 'pathname'
+
class Tty
class <<self
def blue; bold 34; end
@@ -208,6 +210,11 @@ def nostdout
end
module MacOS extend self
+
+ def default_cc
+ Pathname.new("/usr/bin/cc").realpath.basename.to_s
+ end
+
def gcc_42_build_version
`/usr/bin/gcc-4.2 -v 2>&1` =~ /build (\d{4,})/
if $1