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
commit3c3902954b4a00629526a501ec2b7f829bf93e4b (patch)
tree83f6d00960de5778e9835a3fcd1dda6c74619afe /Library
parent64899bbbff8b9059c1e7793b56803b739bffc15d (diff)
downloadbrew-3c3902954b4a00629526a501ec2b7f829bf93e4b.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