When cross-compiling for ia32, do not build 'host' targets with -m32

BUG=94852
TEST=it (cross-)compiles


Review URL: http://codereview.chromium.org/7811014

git-svn-id: http://src.chromium.org/svn/trunk/src/build@101014 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
rsleevi@chromium.org 2011-09-14 02:36:21 +00:00
Родитель 42e853781d
Коммит aad0b3763b
1 изменённых файлов: 68 добавлений и 64 удалений

Просмотреть файл

@ -1428,73 +1428,77 @@
}, },
}, },
'conditions': [ 'conditions': [
[ 'target_arch=="ia32"', { ['target_arch=="ia32"', {
'asflags': [ 'target_conditions': [
# Needed so that libs with .s files (e.g. libicudata.a) ['_toolset=="target"', {
# are compatible with the general 32-bit-ness. 'asflags': [
'-32', # Needed so that libs with .s files (e.g. libicudata.a)
], # are compatible with the general 32-bit-ness.
# All floating-point computations on x87 happens in 80-bit '-32',
# precision. Because the C and C++ language standards allow ],
# the compiler to keep the floating-point values in higher # All floating-point computations on x87 happens in 80-bit
# precision than what's specified in the source and doing so # precision. Because the C and C++ language standards allow
# is more efficient than constantly rounding up to 64-bit or # the compiler to keep the floating-point values in higher
# 32-bit precision as specified in the source, the compiler, # precision than what's specified in the source and doing so
# especially in the optimized mode, tries very hard to keep # is more efficient than constantly rounding up to 64-bit or
# values in x87 floating-point stack (in 80-bit precision) # 32-bit precision as specified in the source, the compiler,
# as long as possible. This has important side effects, that # especially in the optimized mode, tries very hard to keep
# the real value used in computation may change depending on # values in x87 floating-point stack (in 80-bit precision)
# how the compiler did the optimization - that is, the value # as long as possible. This has important side effects, that
# kept in 80-bit is different than the value rounded down to # the real value used in computation may change depending on
# 64-bit or 32-bit. There are possible compiler options to make # how the compiler did the optimization - that is, the value
# this behavior consistent (e.g. -ffloat-store would keep all # kept in 80-bit is different than the value rounded down to
# floating-values in the memory, thus force them to be rounded # 64-bit or 32-bit. There are possible compiler options to
# to its original precision) but they have significant runtime # make this behavior consistent (e.g. -ffloat-store would keep
# performance penalty. # all floating-values in the memory, thus force them to be
# # rounded to its original precision) but they have significant
# -mfpmath=sse -msse2 makes the compiler use SSE instructions # runtime performance penalty.
# which keep floating-point values in SSE registers in its #
# native precision (32-bit for single precision, and 64-bit for # -mfpmath=sse -msse2 makes the compiler use SSE instructions
# double precision values). This means the floating-point value # which keep floating-point values in SSE registers in its
# used during computation does not change depending on how the # native precision (32-bit for single precision, and 64-bit
# compiler optimized the code, since the value is always kept # for double precision values). This means the floating-point
# in its specified precision. # value used during computation does not change depending on
'conditions': [ # how the compiler optimized the code, since the value is
['branding=="Chromium" and disable_sse2==0', { # always kept in its specified precision.
'conditions': [
['branding=="Chromium" and disable_sse2==0', {
'cflags': [
'-march=pentium4',
'-msse2',
'-mfpmath=sse',
],
}],
# ChromeOS targets Pinetrail, which is sse3, but most of the
# benefit comes from sse2 so this setting allows ChromeOS
# to build on other CPUs. In the future -march=atom would
# help but requires a newer compiler.
['chromeos==1 and disable_sse2==0', {
'cflags': [
'-msse2',
],
}],
# Install packages have started cropping up with
# different headers between the 32-bit and 64-bit
# versions, so we have to shadow those differences off
# and make sure a 32-bit-on-64-bit build picks up the
# right files.
['host_arch!="ia32"', {
'include_dirs+': [
'/usr/include32',
],
}],
],
# -mmmx allows mmintrin.h to be used for mmx intrinsics.
# video playback is mmx and sse2 optimized.
'cflags': [ 'cflags': [
'-march=pentium4', '-m32',
'-msse2', '-mmmx',
'-mfpmath=sse', ],
'ldflags': [
'-m32',
], ],
}], }],
# ChromeOS targets Pinetrail, which is sse3, but most of the
# benefit comes from sse2 so this setting allows ChromeOS
# to build on other CPUs. In the future -march=atom would help
# but requires a newer compiler.
['chromeos==1 and disable_sse2==0', {
'cflags': [
'-msse2',
],
}],
# Install packages have started cropping up with
# different headers between the 32-bit and 64-bit
# versions, so we have to shadow those differences off
# and make sure a 32-bit-on-64-bit build picks up the
# right files.
['host_arch!="ia32"', {
'include_dirs+': [
'/usr/include32',
],
}],
],
# -mmmx allows mmintrin.h to be used for mmx intrinsics.
# video playback is mmx and sse2 optimized.
'cflags': [
'-m32',
'-mmmx',
],
'ldflags': [
'-m32',
], ],
}], }],
['target_arch=="arm"', { ['target_arch=="arm"', {