aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMax Howell2010-02-24 15:05:21 +0000
committerMax Howell2010-02-24 15:13:20 +0000
commit6d90495ef1369da4d055c73139c4e51bf0041959 (patch)
tree8c3c6c98e098626e52811545e0194ddab985332b /Library
parent6465c17baa8d60b983326dc67c476c017a175057 (diff)
downloadhomebrew-6d90495ef1369da4d055c73139c4e51bf0041959.tar.bz2
We need to set CC and CXX for many formula
Fixes #807; Fixes #808
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/ENV.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb
index 55db31e99..e9cfe2cf0 100644
--- a/Library/Homebrew/extend/ENV.rb
+++ b/Library/Homebrew/extend/ENV.rb
@@ -31,8 +31,6 @@ module HomebrewEnvExtension
ENV.delete('CDPATH')
ENV.delete('CPPFLAGS')
ENV.delete('LDFLAGS')
- ENV.delete('CC')
- ENV.delete('CXX')
ENV['MAKEFLAGS']="-j#{Hardware.processor_count}"
@@ -53,6 +51,9 @@ module HomebrewEnvExtension
ENV['CXX'] = "#{prefix}/usr/bin/llvm-g++"
cflags = %w{-O4} # link time optimisation baby!
else
+ # if we don't set these, many formula fail to build
+ ENV['CC'] = '/usr/bin/cc'
+ ENV['CXX'] = '/usr/bin/c++'
cflags = ['-O3']
end
@@ -60,7 +61,7 @@ module HomebrewEnvExtension
# to use a specific linker, however doing this in general causes formula to
# build more successfully because we are changing CC and many build systems
# don't react properly to that
- ENV['LD'] = ENV['CC'] if ENV['CC']
+ ENV['LD'] = ENV['CC']
# optimise all the way to eleven, references:
# http://en.gentoo-wiki.com/wiki/Safe_Cflags/Intel