aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAustin Ziegler2009-10-01 10:18:17 -0400
committerMax Howell2009-10-01 16:17:54 +0100
commit3f316bfc35c1ec775bf7b2289077ef2c89efe861 (patch)
tree13b598eb7e4b971a8f32e7dd793ca593f82a61ad /Library
parent43bd334ae563516cb83d86d1b2215973da026436 (diff)
downloadhomebrew-3f316bfc35c1ec775bf7b2289077ef2c89efe861.tar.bz2
Set LD to CC
This is generally the right thing to do. It should fix more build problems than it hinders. Especially on Snow Leopard. This fixes the pngcrush build.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/brewkit.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Homebrew/brewkit.rb b/Library/Homebrew/brewkit.rb
index 2b10a517e..f120cc468 100644
--- a/Library/Homebrew/brewkit.rb
+++ b/Library/Homebrew/brewkit.rb
@@ -48,6 +48,11 @@ else
ENV['CXX']="g++-4.2"
cflags = ['-O3']
end
+# in rare cases this may break your builds, as the tool for some reason wants
+# 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']
# optimise all the way to eleven, references:
# http://en.gentoo-wiki.com/wiki/Safe_Cflags/Intel
@@ -106,9 +111,11 @@ module HomebrewEnvExtension
when 10.5
self['CC']=nil
self['CXX']=nil
+ self['LD']=nil
when 10.6..11.0
self['CC']='gcc-4.0'
self['CXX']='g++-4.0'
+ self['LD']=self['CC']
remove_from_cflags '-march=core2'
self.O3
end
@@ -124,6 +131,7 @@ module HomebrewEnvExtension
# Sometimes you want to downgrade from LLVM to GCC 4.2
self['CC']="gcc-4.2"
self['CXX']="g++-4.2"
+ self['LD']=self['CC']
self.O3
end
def osx_10_4