Skip to content
This repository has been archived by the owner on Mar 12, 2019. 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 Aug 29, 2013
1 parent ba3aa96 commit 82e44fc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Library/Homebrew/extend/ENV/std.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,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 82e44fc

Please sign in to comment.