Fix ENV.m32 under superenv
This commit is contained in:
parent
a9a5c53d75
commit
d61615890f
@ -132,9 +132,7 @@ class Cmd
|
|||||||
else
|
else
|
||||||
enum.next
|
enum.next
|
||||||
end
|
end
|
||||||
when "-m32"
|
when "-m32", "-m64"
|
||||||
args << arg if cccfg?("3") || cccfg?("K")
|
|
||||||
when "-m64"
|
|
||||||
args << arg if cccfg?("K")
|
args << arg if cccfg?("K")
|
||||||
when /^-Xarch_/
|
when /^-Xarch_/
|
||||||
refurbished = refurbish_arg(enum.next, enum)
|
refurbished = refurbish_arg(enum.next, enum)
|
||||||
|
|||||||
@ -84,7 +84,6 @@ module Superenv
|
|||||||
# compiler flag stripping. It consists of a string of characters which act
|
# compiler flag stripping. It consists of a string of characters which act
|
||||||
# as flags. Some of these flags are mutually exclusive.
|
# as flags. Some of these flags are mutually exclusive.
|
||||||
#
|
#
|
||||||
# 3 - A 32-bit build was requested
|
|
||||||
# O - Enables argument refurbishing. Only active under the
|
# O - Enables argument refurbishing. Only active under the
|
||||||
# make/bsdmake wrappers currently.
|
# make/bsdmake wrappers currently.
|
||||||
# x - Enable C++11 mode.
|
# x - Enable C++11 mode.
|
||||||
@ -297,6 +296,10 @@ module Superenv
|
|||||||
append "HOMEBREW_CCCFG", "K"
|
append "HOMEBREW_CCCFG", "K"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def m32
|
||||||
|
append "HOMEBREW_ARCHFLAGS", "-m32"
|
||||||
|
end
|
||||||
|
|
||||||
def cxx11
|
def cxx11
|
||||||
case homebrew_cc
|
case homebrew_cc
|
||||||
when "clang"
|
when "clang"
|
||||||
@ -321,11 +324,6 @@ module Superenv
|
|||||||
append 'HOMEBREW_CCCFG', "O", ''
|
append 'HOMEBREW_CCCFG', "O", ''
|
||||||
end
|
end
|
||||||
|
|
||||||
# m32 on superenv does not add any CC flags. It prevents "-m32" from being erased.
|
|
||||||
def m32
|
|
||||||
append 'HOMEBREW_CCCFG', "3", ''
|
|
||||||
end
|
|
||||||
|
|
||||||
%w{O3 O2 O1 O0 Os}.each do |opt|
|
%w{O3 O2 O1 O0 Os}.each do |opt|
|
||||||
define_method opt do
|
define_method opt do
|
||||||
self['HOMEBREW_OPTIMIZATION_LEVEL'] = opt
|
self['HOMEBREW_OPTIMIZATION_LEVEL'] = opt
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user