aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/extend
diff options
context:
space:
mode:
authorAdam Vandenberg2010-04-22 11:15:03 -0700
committerAdam Vandenberg2010-04-22 17:23:59 -0700
commit7c158e2350fcf0e649e8c0896957dd698eb281cb (patch)
tree357aa41bce8fb3047ad8c190e65e1ebb769a113d /Library/Homebrew/extend
parent54b5a7afbb7d562c3ee3adf607d6067cd6b7d2dc (diff)
downloadbrew-7c158e2350fcf0e649e8c0896957dd698eb281cb.tar.bz2
Fix universal builds on 32-bit CPUs.
Diffstat (limited to 'Library/Homebrew/extend')
-rw-r--r--Library/Homebrew/extend/ENV.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb
index 0e37b9f17..c0b6318a2 100644
--- a/Library/Homebrew/extend/ENV.rb
+++ b/Library/Homebrew/extend/ENV.rb
@@ -179,6 +179,9 @@ module HomebrewEnvExtension
append_to_cflags '-arch i386 -arch x86_64'
ENV.O3 if self['CFLAGS'].include? '-O4' # O4 seems to cause the build to fail
ENV.append 'LDFLAGS', '-arch i386 -arch x86_64'
+
+ # Can't mix "-march" for a 32-bit CPU with "-arch x86_64"
+ remove_from_cflags(/-march=\S*/) if Hardware.is_32_bit?
end
def prepend key, value, separator = ' '