From 1333b8d666a7ef7627aef4598c15e4605bd84e60 Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Thu, 15 Aug 2013 23:04:26 -0700 Subject: [PATCH] ENV.universal_binary: use as_arch_flags --- Library/Homebrew/extend/ENV.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/extend/ENV.rb b/Library/Homebrew/extend/ENV.rb index a5d17da6d8..b571d7995e 100644 --- a/Library/Homebrew/extend/ENV.rb +++ b/Library/Homebrew/extend/ENV.rb @@ -292,9 +292,9 @@ module HomebrewEnvExtension end def universal_binary - append_to_cflags "-arch #{Hardware::CPU.arch_32_bit} -arch #{Hardware::CPU.arch_64_bit}" + append_to_cflags Hardware::CPU.universal_archs.as_arch_flags replace_in_cflags '-O4', '-O3' # O4 seems to cause the build to fail - append 'LDFLAGS', "-arch #{Hardware::CPU.arch_32_bit} -arch #{Hardware::CPU.arch_64_bit}" + append 'LDFLAGS', Hardware::CPU.universal_archs.as_arch_flags if compiler != :clang && Hardware.is_32_bit? # Can't mix "-march" for a 32-bit CPU with "-arch x86_64"