diff options
| author | Max Howell | 2009-09-03 22:39:49 +0100 |
|---|---|---|
| committer | Max Howell | 2009-09-03 22:39:49 +0100 |
| commit | a12569699e299d470ec9746d0dc0ae1e9ce940f7 (patch) | |
| tree | 8bcea6f278f9da4fea79117fd8796f182f6ee885 /Library/Homebrew/hardware.rb | |
| parent | 18d9fbee9804f0862ed42ddd89b00e3999470c9e (diff) | |
| download | brew-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 'Library/Homebrew/hardware.rb')
| -rw-r--r-- | Library/Homebrew/hardware.rb | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/Library/Homebrew/hardware.rb b/Library/Homebrew/hardware.rb index 55de6fd0b..3059f0875 100644 --- a/Library/Homebrew/hardware.rb +++ b/Library/Homebrew/hardware.rb @@ -60,41 +60,6 @@ class Hardware @@processor_count ||= `/usr/sbin/sysctl -n hw.ncpu`.to_i end - def self.gcc_march # what to pass to gcc - @@gcc_march ||= if self.cpu_type == :intel - case self.intel_family - when :core - " -march=prescott" - when :core2, :penryn, :nehalem - # GCC 4.3 has a -march=core2, but this isn't 4.3 and nocona is correct - " -march=nocona" - end - else - "" - end - end - - def self.gcc_msse # what to pass to gcc - # avoid sse4 for now in case it blows up - @@gcc_msse ||= if sysctl_bool("hw.optional.sse3") - " -msse3 -mfpmath=sse" - else - "" - end - end - - def self.gcc_mmmx # what to pass to gcc - @@gcc_mmmx ||= if sysctl_bool("hw.optional.mmx") - " -mmmx" - else - "" - end - end - - def self.is_64bit? - @@is_64bit ||= sysctl_bool("hw.cpu64bit_capable") - end - protected def self.sysctl_bool(property) result = nil |
