aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMax Howell2009-09-03 22:39:49 +0100
committerMax Howell2009-09-03 22:39:49 +0100
commita12569699e299d470ec9746d0dc0ae1e9ce940f7 (patch)
tree8bcea6f278f9da4fea79117fd8796f182f6ee885 /bin
parent18d9fbee9804f0862ed42ddd89b00e3999470c9e (diff)
downloadbrew-a12569699e299d470ec9746d0dc0ae1e9ce940f7.tar.bz2
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.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/brew16
1 files changed, 9 insertions, 7 deletions
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