From c7f661f713d07160623e7c212df6bbce07806708 Mon Sep 17 00:00:00 2001 From: Adam Rudd Date: Tue, 21 Aug 2012 13:10:43 +0200 Subject: [PATCH] Adjusted LD build flag to point to /usr/bin/ld Without this, brew attempts to use /usr/bin/cc as the linker. --- Library/Homebrew/extend/ENV.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb index 584ef9e92bfa..7c0d632e922a 100644 --- a/Library/Homebrew/extend/ENV.rb +++ b/Library/Homebrew/extend/ENV.rb @@ -25,6 +25,7 @@ def setup_build_environment if SystemCommand.platform == :linux self['CC'] = '/usr/bin/cc' self['CXX'] = '/usr/bin/c++' + self['LD'] = '/usr/bin/ld' cflags = ['-O3'] else # Os is the default Apple uses for all its stuff so let's trust them @@ -45,7 +46,7 @@ def setup_build_environment # 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. - self['LD'] = self['CC'] + self['LD'] ||= self['CC'] end def deparallelize