From e6e534157c1d0c1a5d5306364a48fa828b052c0d Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 20 Dec 2018 20:09:45 +0000 Subject: [PATCH] ENV/super: copy Hackintosh comment from ENV/std. --- Library/Homebrew/extend/ENV/super.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Library/Homebrew/extend/ENV/super.rb b/Library/Homebrew/extend/ENV/super.rb index a47fbcbc71..9dec1b01f1 100644 --- a/Library/Homebrew/extend/ENV/super.rb +++ b/Library/Homebrew/extend/ENV/super.rb @@ -233,6 +233,9 @@ module Superenv if ARGV.build_bottle? arch = ARGV.bottle_arch || Hardware.oldest_cpu Hardware::CPU.optimization_flags.fetch(arch) + # If the CPU doesn't support SSE4, we cannot trust -march=native or + # -march= to do the right thing because we might be running + # in a VM or on a Hackintosh. elsif Hardware::CPU.intel? && !Hardware::CPU.sse4? Hardware::CPU.optimization_flags.fetch(Hardware.oldest_cpu) elsif ![:gcc_4_0, :gcc_4_2].include?(compiler)