Status: New
Owner: ----
New issue 1648 by [email protected]: Cross-compiling issue building on
x64 host targeting ia32 target
http://code.google.com/p/v8/issues/detail?id=1648
This came up while working through Chromium Issue 98452
(http://crbug.com/94852)
v8/build/common.gypi is "currently" (r9061) implemented as:
http://codesearch.google.com/codesearch#OAMlx_jo-ck/src/v8/build/common.gypi&l=56
'conditions': [
['(v8_target_arch=="arm" and host_arch!="arm") or \
(v8_target_arch=="x64" and host_arch!="x64")', {
'want_separate_host_toolset': 1,
}, {
'want_separate_host_toolset': 0,
}],
],
In the case of the Chromium issue reported, it's a cross-compiled ia32
target (ChromiumOS) being built on an x64 host. In this case,
v8_target_arch == target_arch == ia32, while host_arch == x64.
Because the GYP condition above does not handle this,
want_separate_host_toolset is NOT being set to 1. On the Chromium side,
this is fine, as long as -m32 is always passed in cflags_cc for host
binaries (which it is, prior to the Chromium issue). However, in trying to
remove that flag for host binaries (so they are built x64), v8 failed to
compile, with the following errors:
In file included from v8/src/allocation.cc:29:
v8/src/globals.h:84:2:error: #error Target architecture ia32 is only
supported on ia32 host
make: *** [out/Release/obj.host/v8_base/v8/src/allocation.o] Error 1
CXX(host) out/Release/obj.host/v8_base/v8/src/ia32/code-stubs-ia32.o
In file included from v8/src/v8globals.h:31,
from v8/src/v8.h:53,
from v8/src/builtins.cc:28:
v8/src/globals.h:84:2:error: #error Target architecture ia32 is only
supported on ia32 host
In file included from v8/src/macro-assembler.h:65,
from v8/src/ic.h:31,
from v8/src/ic-inl.h:31,
from v8/src/builtins.cc:35:
My belief is that because want_separate_host_toolset isn't set, separate
builds of v8 (x64 host, ia32 target) aren't being created, so it's failing
to build the dependency when compiling the host executable that depends on
v8.
I believe the fix is to change the conditional to
['v8_target_arch!=host_arch']
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev