diff options
| author | Misty De Meo | 2014-01-04 01:20:56 -0800 |
|---|---|---|
| committer | Misty De Meo | 2014-01-04 01:20:56 -0800 |
| commit | d7a61617512a120454fd3a7edd7126e050cc4633 (patch) | |
| tree | 74337b7936ddeb80308290d1391172e27499670b | |
| parent | 3cf2cc853d522b03fea16c599996bd55b3bc03bd (diff) | |
| download | brew-d7a61617512a120454fd3a7edd7126e050cc4633.tar.bz2 | |
Recommit ENV changes
| -rw-r--r-- | Library/Homebrew/extend/ENV/std.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/os/mac.rb | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/Library/Homebrew/extend/ENV/std.rb b/Library/Homebrew/extend/ENV/std.rb index b9cbfbc68..51d9ef1ff 100644 --- a/Library/Homebrew/extend/ENV/std.rb +++ b/Library/Homebrew/extend/ENV/std.rb @@ -119,7 +119,7 @@ module Stdenv self.cxx = "#{MacOS.dev_tools_path}/g++-4.0" replace_in_cflags '-O4', '-O3' set_cpu_cflags '-march=nocona -mssse3' - @compiler = :gcc + @compiler = :gcc_4_0 end alias_method :gcc_4_0, :gcc_4_0_1 @@ -131,7 +131,7 @@ module Stdenv self.cc = MacOS.locate("gcc-4.2") self.cxx = MacOS.locate("g++-4.2") - unless cc + if cc.empty? self.cc = "#{HOMEBREW_PREFIX}/bin/gcc-4.2" self.cxx = "#{HOMEBREW_PREFIX}/bin/g++-4.2" raise "GCC could not be found" unless File.exist? cc diff --git a/Library/Homebrew/os/mac.rb b/Library/Homebrew/os/mac.rb index 24c1b7181..c42e79727 100644 --- a/Library/Homebrew/os/mac.rb +++ b/Library/Homebrew/os/mac.rb @@ -99,11 +99,12 @@ module OS def default_cc cc = locate 'cc' - Pathname.new(cc).realpath.basename.to_s rescue nil + cc.realpath.basename.to_s rescue nil end def default_compiler case default_cc + when /^gcc-4.0/ then :gcc_4_0 when /^gcc/ then :gcc when /^llvm/ then :llvm when "clang" then :clang |
