Skip to content
This repository has been archived by the owner on Nov 27, 2017. It is now read-only.

Commit

Permalink
GCC is named gcc-4.2 on MacOS and gcc elsewhere
Browse files Browse the repository at this point in the history
  • Loading branch information
sjackman committed Jun 27, 2013
1 parent 2917d9f commit d8c0006
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Library/Homebrew/extend/ENV.rb
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,13 @@ def gcc
# However they still provide a gcc symlink to llvm
# But we don't want LLVM of course.

self['CC'] = self['OBJC'] = MacOS.locate("gcc-4.2")
self['CXX'] = self['OBJCXX'] = MacOS.locate("g++-4.2")
cc, cxx = if MACOS then ['gcc-4.2', 'g++-4.2'] else ['gcc', 'g++'] end
self['CC'] = self['OBJC'] = MacOS.locate(cc)
self['CXX'] = self['OBJCXX'] = MacOS.locate(cxx)

unless self['CC']
self['CC'] = self['OBJC'] = "#{HOMEBREW_PREFIX}/bin/gcc-4.2"
self['CXX'] = self['OBJCXX'] = "#{HOMEBREW_PREFIX}/bin/g++-4.2"
self['CC'] = self['OBJC'] = "#{HOMEBREW_PREFIX}/bin/#{cc}"
self['CXX'] = self['OBJCXX'] = "#{HOMEBREW_PREFIX}/bin/#{cxx}"
raise "GCC could not be found" unless File.exist? self['CC']
end

Expand Down

0 comments on commit d8c0006

Please sign in to comment.