Ok i managed to solve this problem. Solution is different make arguments. This is a solution that works for me:
make arm.release arm_version=6 armfpu=vfp armfloatabi=hard Now all unit tests pass, sample code and my program all work nicely. I will check if it works on newer kernel version and post here. Thanks for help people On Friday, January 9, 2015 at 3:40:30 PM UTC+1, Milan Pandurov wrote: > > I am having a problem with cross compiling google v8 libraries for > raspberry pi, and constantly getting "Illegal instruction" error when > compiling official sample from site. These are the steps i followed: > > 1. Downloaded cross compile https://github.com/raspberrypi/tools/ > 2. Cloned v8 git https://chromium.googlesource.com/v8/v8.git > 3. Exported CXX LINK point to arm-linux-gnueabihf-g++ from cross > compile tools. > 4. run make arm.release armv7=false hardfp=on snapshot=off armfpu=vfp > armfloatabi=hard -j5 > 5. Copied generated executable shell and d8 from out/arm.release > directory to pi (Raspbian kernel version 3.6.11) and it WORKS. These steps > prove that cross compilation toolchain is functional. > > Problem occurs when trying to run other cross-compiled software that is > linked to v8 libraries. For example sample code from > https://developers.google.com/v8/get_started#intro. Code is > cross-compiled with this command (same as example, just changed compiler) > > arm-linux-gnueabihf-g++ -I. hello_world.cc -o hello_world -Wl,--start-group > out/x64.release/obj.target/{tools/gyp/libv8_{base,libbase,snapshot,libplatform},third_party/icu/libicu{uc,i18n,data}}.a > -Wl,--end-group -lrt -pthread > > > When i copy that code to pi and run it i get SIGILL (Illegal instruction). > > Note: cross compiled software that doesn't use v8 libraries works fine. > Also x64 v8 libraries on host computer work fine. > > On newer kernel versions shell and d8 were also throwing SIGILL but than > i switched to older version 3.6.11 (problems with newer kernel > https://groups.google.com/forum/#!topic/v8-users/IPT9EeYK9bg) and they > started working, but compiled sample code is still showed same issues. > > Did anyone have similar experience? Any suggestion on how to overcome this > problem? > -- -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
