Skip to content
Snippets Groups Projects
Commit f43bb0c2 authored by cadrpear's avatar cadrpear Committed by Jack Nagel
Browse files

Fix building universal binaries on 32-bit CPUs


[jn: style, update comment]

Closes Homebrew/homebrew#25728.
Fixes Homebrew/homebrew#26834.

Signed-off-by: default avatarJack Nagel <jacknagel@gmail.com>
parent a1d2aa0f
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment