So it was easy to enable it, but there was two problems. For some reason, there’s some parts of the v8 code that forces to use the -m32 flag, which is for building 32bits binaries on 64bits systems. ARM is 32bits, so that flag doesn’t exist. To be honest i’m not sure what its doing there. Maybe i’m not getting the logic of it. If you build stuff for arm on a 64bits system, you need to use a crosscompiler. That ARM crosscompiler AFAIK doesn’t support -m32. However for compiling for x86 on a amd64 system you don’t need a crosscompiler, but you need to use -m32, am i wrong? Then i don’t see the point on using that…
Anyway, the bugs are filed upstream: here and here. Meanwhile in the 9999 ebuild i’ll apply a hackish patch.
The second problem is that the build of v8 on armv5te segfaults:
g++ -Os -march=armv5te -pipe -Os -march=armv5te -pipe -pthread -fno-exceptions -Wall -D_FILE_OFFSET_BITS=64 -O0 -g -fno
-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -DENABLE_LOGGING_AND_PROFILING -DENABLE_DEBUGGER_SUPPORT -D__ST
DC_FORMAT_MACROS -DDISABLE_NACL -DV8_TARGET_ARCH_ARM -DCHROMIUM_BUILD -D_DEBUG -DDEBUG -DENABLE_DISASSEMBLER -DV8_ENABLE_
CHECKS -Iv8/src -MMD -MF out/Debug/obj.host/mksnapshot/v8/src/mksnapshot.o.d.tmp -c -o out/Debug/obj.host/mksnapshot/v8/s
g++ -Wl,-O1 -Wl,-O1 -pthread -rdynamic -o out/Debug/mksnapshot -Wl,--start-group out/Debug/obj.host/mksnapshot/v8/src/m
ksnapshot.o out/Debug/obj.host/v8/tools/gyp/libv8_nosnapshot.a out/Debug/obj.host/v8/tools/gyp/libv8_base.a -Wl,--end-gro
/www-client/chromium-9999/work/chromium-9999/out/Debug/lib.target:$LD_LIBRARY_PATH; cd v8/tools/gyp; mkdir -p /var/tmp/po
# Fatal error in v8/src/arm/assembler-arm.cc, line 1795
# CHECK((instr & (7*B25 | P | U | B | W | 15*B16 | Off12Mask)) == (2*B25 | P | U | pc.code()*B16)) failed
/bin/sh: line 1: 26922 Aborted "/var/tmp/portage/www-client/chromium-9999/work/chromium-9999/out/Debug/mksnapshot" "/var/tmp/portage/www-client/chromium-9999/work/chromium-9999/out/Debug/obj.target/geni/snapshot.cc"
make: *** [out/Debug/obj.target/geni/snapshot.cc] Error 134
If anyone knows what that means, i would be glad to hear On the other part, it builds on armv7. So that makes me think that v8 only works on ARMv7…but i’m no ARM assembler or expert or anything, so i can’t tell… Could be that the softfloat armv5tel toolchain is doing something wrong…but looks unlikely considering nothing else fails…
Here’s the binary for armv7a: http://dev.gentoo.org/~armin76/arm/chromium-9999_armv7a.tbz2