diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb index e1898a5694..931f69271b 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