From d212b360eca4969109a3bfcf0fd86e45b75554f7 Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Mon, 27 May 2013 12:54:07 -0500 Subject: superenv: Improve compiler selection This fixes superenv on Xcode 3.2.6, and also fixes C++ software with gcc-4.2 on all Xcodes. --- Library/ENV/4.3/cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'Library/ENV') diff --git a/Library/ENV/4.3/cc b/Library/ENV/4.3/cc index 3d6241c1f..b96c0015e 100755 --- a/Library/ENV/4.3/cc +++ b/Library/ENV/4.3/cc @@ -62,12 +62,15 @@ class Cmd # the work since Makefiles are dumb and include a lot of excess flags. ENV['HOMEBREW_CC'] when 'c++' - if ENV['HOMEBREW_CC'] =~ /llvm-gcc/ + case ENV['HOMEBREW_CC'] + when /clang/ + 'clang++' + when /llvm-gcc/ 'g++' - elsif ENV['HOMEBREW_CC'] =~ /gcc-4.2/ + when /gcc(-4.2)?$/ 'g++-4.2' - else - 'clang++' + when /gcc-4.0/ + 'g++-4.0' end else @arg0 -- cgit v1.2.3