From a12569699e299d470ec9746d0dc0ae1e9ce940f7 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Thu, 3 Sep 2009 22:39:49 +0100 Subject: Fix some "GCC cannot create executables" This regards Issue Homebrew/homebrew#30. Turns out -march=native isn't supported by Apple's GCC, but while investigating it I found they'd back ported the -march=core2 option, so we win anyway. Logic reverted to how it was yesterday. I moved the gcc options stuff back to brewkit.rb as we manipulate the cflags more later and it seemed bad form to split the logic for this area over two files. Additionally the brew command exits immediately on powerpc now. Brewkit doesn't throw as theoretically it is a useful library file for other projects.--- bin/brew | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'bin') diff --git a/bin/brew b/bin/brew index da6217a3b..e58fa38db 100755 --- a/bin/brew +++ b/bin/brew @@ -1,9 +1,9 @@ #!/usr/bin/ruby $:.unshift ENV['RUBYLIB']=File.expand_path(__FILE__+'/../../Library/Homebrew') - require 'pathname+yeast' require 'ARGV+yeast' require 'utils' +require 'hardware' require 'brew.h' if Process.uid == 0 @@ -20,17 +20,19 @@ HOMEBREW_VERSION='0.4' HOMEBREW_WWW='http://bit.ly/Homebrew' HOMEBREW_USER_AGENT="Homebrew #{HOMEBREW_VERSION} (Ruby #{VERSION}; Mac OS X 10.5 Leopard)" -if %w[/ /usr].include? HOMEBREW_PREFIX.to_s then abort <<-troba -You have placed Homebrew at the prefix: #{HOMEBREW_PREFIX} -This is not currently supported. Voice your support for this feature at: -#{HOMEBREW_WWW} -troba +if %w[/ /usr].include? HOMEBREW_PREFIX.to_s then abort <<-EOS + You have placed Homebrew at the prefix: #{HOMEBREW_PREFIX} + This is not currently supported. Voice your support for this feature at: + #{HOMEBREW_WWW} + EOS end - if `sw_vers -productVersion` =~ /10\.(\d)\.(\d+)/ and $1.to_i < 5 onoe "Homebrew requires Leopard or higher" abort "But thanks for your interest anyway!" end +if Hardware.cpu_type == :ppc or Hardware.cpu_type == :dunno + abort "Sorry, Homebrew does not support your computer's CPU architecture." +end begin -- cgit v1.2.3