Updates:
Status: WorkingAsIntended
Comment #3 on 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
Already looked at it :-)
TL;DR: building a ia32 V8 requires a host capable of running ia32 binaries.
Details:
To clarify: when building v8 as part of Chromium, v8/build/standalone.gypi
(which now contains what was in common.gypi as mention in the original
report) is not used, so the conditions in there are irrelevant (and
correct, AFAICT).
The main issue here is that for performance reasons, we build v8 with a
so-called snapshot. To do that, we compile the v8 library without snapshot,
link it into a 'mksnapshot' binary (in the 'host' toolset), use that to
create the snapshot (which is a generated .cc file containing a kind of
memory dump), and then build the final v8 binaries for the target
architecture ('target' toolset).
To get a functioning snapshot, 'mksnapshot' must have the same architecture
as the target, and must obviously be executable on the build host. That's
why an x64 build host needs to have multilib support in order to compile
ia32 v8 binaries.
(On a related note, cross-compiling for ARM is only possible thanks to the
ARM simulator integrated into V8. In that scenario, 'host' toolset binaries
using the simulator are used to create the snapshot. Since we don't have an
ia32 simulator, we need multilib instead.)
If Chromium no longer wants to set the -m32 flag for ia32 builds (including
their 'host' toolset), we could do that in v8's .gyp files. Please reply if
you want that. In the meantime, closing as WONTFIX.
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev