Fix building universal binaries on 32-bit CPUs
[jn: style, update comment] Closes Homebrew/homebrew#25728. Fixes Homebrew/homebrew#26834. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
parent
a1d2aa0f69
commit
f43bb0c292
@ -262,6 +262,14 @@ module Superenv
|
||||
def universal_binary
|
||||
self['HOMEBREW_ARCHFLAGS'] = Hardware::CPU.universal_archs.as_arch_flags
|
||||
append 'HOMEBREW_CCCFG', "u", ''
|
||||
|
||||
# GCC doesn't accept "-march" for a 32-bit CPU with "-arch x86_64"
|
||||
if compiler != :clang && Hardware.is_32_bit?
|
||||
self['HOMEBREW_OPTFLAGS'] = self['HOMEBREW_OPTFLAGS'].sub(
|
||||
/-march=\S*/,
|
||||
"-Xarch_#{Hardware::CPU.arch_32_bit} \\0"
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
def cxx11
|
||||
|
Loading…
x
Reference in New Issue
Block a user