aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMax Howell2011-08-24 00:35:45 +0100
committerMax Howell2011-08-24 22:30:44 +0100
commitb025fb1397269583e9349749f6398f7616bafd70 (patch)
tree7ba1e9d22bd48ffe7fcd2d17c9c310f81bfcb535 /Library
parentb0c6970dec20a983309bcfda9df72074582f0a6f (diff)
downloadbrew-b025fb1397269583e9349749f6398f7616bafd70.tar.bz2
Use -march=native when we don't otherwise know
I believe this works nowadays. When I created Homebrew originally, it did nothing. Hence all the other logic.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/ENV.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb
index e1898a569..931f69271 100644
--- a/Library/Homebrew/extend/ENV.rb
+++ b/Library/Homebrew/extend/ENV.rb
@@ -59,6 +59,10 @@ module HomebrewEnvExtension
cflags << "-march=core2"
when :core
cflags<<"-march=prescott"<<"-mfpmath=sse"
+ else
+ # note that this didn't work on older versions of Xcode's gcc
+ # and maybe still doesn't. But it's at least not worse than nothing.
+ cflags << "-march=native"
end
# gcc doesn't auto add msse4 or above (based on march flag) yet
case Hardware.intel_family