From 4d940628cc71c57e63f9c414199db7cee6ff549d Mon Sep 17 00:00:00 2001 From: Tom von Schwerdtner Date: Fri, 4 Sep 2009 01:15:40 -0400 Subject: [PATCH] Plain Core Duo can't execute 64 bit code --- Library/Homebrew/brewkit.rb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Library/Homebrew/brewkit.rb b/Library/Homebrew/brewkit.rb index e7eae94e1d..4c9bdbc262 100644 --- a/Library/Homebrew/brewkit.rb +++ b/Library/Homebrew/brewkit.rb @@ -37,6 +37,9 @@ require 'hardware' MACOS_VERSION=$1.to_f ENV['MACOSX_DEPLOYMENT_TARGET']=$1 +# to be consistent with cflags, we ignore the existing environment +ENV['LDFLAGS']="" + cflags=%w[-O3] # optimise all the way to eleven, references: @@ -46,12 +49,12 @@ cflags=%w[-O3] if MACOS_VERSION >= 10.6 case Hardware.intel_family when :penryn, :core2 - cflags<<"-march=core2" + # no need to add -mfpmath when you specify -m64 + cflags<<"-march=core2"<<'-m64' + ENV['LDFLAGS']="-arch x86_64" when :core - cflags<<"-march=prescott" + cflags<<"-march=prescott"<<"-mfpmath=sse" end - ENV['LDFLAGS']="-arch x86_64" - cflags<<"-m64" else case Hardware.intel_family when :penryn, :core2 @@ -59,8 +62,6 @@ else when :core cflags<<"-march=prescott" end - # to be consistent with cflags, we ignore the existing environment - ENV['LDFLAGS']="" cflags<<"-mfpmath=sse" # gcc 4.0 is the default on Leopard ENV['CC']="gcc-4.2"