From bfda554d30ff96b0ecc386e910efee751c60be9b Mon Sep 17 00:00:00 2001 From: Max Howell Date: Wed, 24 Aug 2011 00:35:45 +0100 Subject: 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. --- Library/Homebrew/extend/ENV.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Library/Homebrew') 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 -- cgit v1.2.3