On 09/11/2010 10:33, Loïc Minier wrote: > On Tue, Nov 09, 2010, Jérémy Lal wrote: >>> -mno-thumb-interwork is a bit suspicious; I'm not entirely comfortable >>> on the architecture revisions and cases where these flags are >>> explicitly needed, but in any case the toolchain defaults should be >>> fine. >> >> It seems the only reason left for that flag is because v8 code complains >> about missing 'blx' instruction when arch is armv4t (the gcc default on >> debian). >> Reported at >> http://code.google.com/p/v8/issues/detail?id=590 > > Apparently the code can not deal with Thumb inter-working for ARMv4T, > only starting with ARMv5T: > // We do not support thumb inter-working with an arm architecture not > supporting > // the blx instruction (below v5t). If you know what CPU you are compiling > for > // you can use -march=armv7 or similar. > #if defined(USE_THUMB_INTERWORK) && !defined(CAN_USE_THUMB_INSTRUCTIONS) > # error "For thumb inter-working we require an architecture which supports > blx" > #endif > > the test seems correct for the limitation explained in the comment; I > can also see some tricky blx handling in the code, so it seems entirely > plausible that the code wouldn't work on ARMv4T with Thumb > interworking (blx is ARMv5/ARMv5T+). > > Hence building with -mno-thumb-interwork seems correct with Debian (I > think the toolchain defaults to -mthumb-interwork) and is truly libv8 > specific. > > I'm a bit surprized that you managed to build for armv4t and using blx; > in my test, it doesn't work: > echo 'void foo(void) { __asm__ volatile("blx 0"); }' | arm-linux-gnueabi-gcc > -mthumb -march=armv4t -x c -c - -o /dev/null > /tmp/cc2fO8Ba.s: Assembler messages: > /tmp/cc2fO8Ba.s:25: Error: selected processor does not support Thumb mode > `blx 0' > echo 'void foo(void) { __asm__ volatile("blx 0"); }' | arm-linux-gnueabi-gcc > -marm -march=armv4t -x c -c - -o /dev/null > /tmp/cc4g7aYh.s: Assembler messages: > /tmp/cc4g7aYh.s:26: Error: selected processor does not support ARM mode `blx > 0'
Indeed, but if you grep for blx in src/arm/ you'll notice conditional code to handle the case where it's not available. I'm waiting for some comments from upstream about that : i suspect the test has been deprecated by other corrections. > I'm not sure Thumb inter-working is too much of a big deal for the > current targets: it seems you can't use it on armv4t which is what > Debian armel targets, and it's mostly not needed on ARMv7+ which is > what armhf and Ubuntu armel target. Would probably best not to pass > the -mno-thumb-interwork flag if you don't need to, but it shouldn't > affect current targets. I did not know that, so i'll let -mno-thumb-interwork if my previous comment is wrong. Jérémy. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org