Cross compiling v8 for armv7 on 64bit linux

20 views
Skip to first unread message

luca.li...@gmail.com

unread,
May 23, 2019, 11:59:02 AM5/23/19
to v8-dev

I am building NodeJS for ARMv7 on a x86_64 linux machine. I noticed that torque is compiled for x86, though running a 64bit system.

It is no problem for my desktop system where I can install a multilib libstc++, however this is a bit ugly for our build environment.


So I wondered in general whether there is actual any requirement to build torque in 32bit, since it is a host tool anyway.

Is this really required (maybe because I am cross compiling for 32bit ARM) or is it just a build system limitation?

Jakob Kummerow

unread,
May 23, 2019, 12:23:14 PM5/23/19
to v8-...@googlegroups.com
I guess Torque just inherits the build settings: it is not the only host tool. The other (and older) tool is mksnapshot, which needs to match the bit-ness of the target, i.e. you need a 32-bit mksnapshot when you're building for a 32-bit target. 32-bit-x86 host tools and 32-bit-arm target is fine (that's what V8's built-in simulator is for), but since mksnapshot creates a heap snapshot which is then used on the target, the pointers in that heap must have the correct size.

TL;DR: yes, you'll need multilib when cross-compiling for a 32-bit target on a 64-bit host, but that's not because of Torque.


--
--
v8-dev mailing list
v8-...@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-dev+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/761d64e6-561f-454e-b235-67eb178910c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

luca.li...@gmail.com

unread,
May 24, 2019, 3:26:01 AM5/24/19
to v8-dev
Ok thanks for the quick response.

Am Donnerstag, 23. Mai 2019 18:23:14 UTC+2 schrieb Jakob Kummerow:
I guess Torque just inherits the build settings: it is not the only host tool. The other (and older) tool is mksnapshot, which needs to match the bit-ness of the target, i.e. you need a 32-bit mksnapshot when you're building for a 32-bit target. 32-bit-x86 host tools and 32-bit-arm target is fine (that's what V8's built-in simulator is for), but since mksnapshot creates a heap snapshot which is then used on the target, the pointers in that heap must have the correct size.

TL;DR: yes, you'll need multilib when cross-compiling for a 32-bit target on a 64-bit host, but that's not because of Torque.


On Thu, May 23, 2019 at 5:59 PM <luca.l...@gmail.com> wrote:

I am building NodeJS for ARMv7 on a x86_64 linux machine. I noticed that torque is compiled for x86, though running a 64bit system.

It is no problem for my desktop system where I can install a multilib libstc++, however this is a bit ugly for our build environment.


So I wondered in general whether there is actual any requirement to build torque in 32bit, since it is a host tool anyway.

Is this really required (maybe because I am cross compiling for 32bit ARM) or is it just a build system limitation?

--
--
v8-dev mailing list
v8-...@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages