Recommit ENV changes

This commit is contained in:
Misty De Meo 2014-01-04 01:20:56 -08:00
parent 3cf2cc853d
commit d7a6161751
2 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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