2015-01-09 91 views
2

我交叉编译谷歌V8库树莓派,并不断收到“非法指令”错误编译正式样本从网站时出现问题。这是我遵循的步骤:交叉编译谷歌V8库的树莓派

  1. 下载交叉从交叉编译https://github.com/raspberrypi/tools/
  2. 克隆V8混帐https://chromium.googlesource.com/v8/v8.git
  3. 出口CXX LINK点arm-linux-gnueabihf-g++编译工具。
  4. 运行make arm.release armv7=false hardfp=on snapshot=off armfpu=vfp armfloatabi=hard -j5
  5. 复制生成的可执行shelld8从出/ arm.release目录到pi(Raspbian内核版本3.6.11)和它的工作原理。 这些步骤证明交叉编译工具链是可用的。

尝试运行链接到v8库的其他交叉编译软件时发生问题。例如来自https://developers.google.com/v8/get_started#intro的示例代码。 代码是交叉编译使用此命令(同例子,只是改变了编译器)

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 

当我的代码复制到pi和运行它,我得到SIGILL(非法指令)。

注意:不使用v8库的交叉编译软件可以正常工作。主机上的x64 v8库也可正常工作。

在较新的内核版本shelld8也扔SIGILL但比我切换到旧版本3.6.11(问题新内核https://groups.google.com/forum/#!topic/v8-users/IPT9EeYK9bg),他们开始工作,但编译示例代码仍表现出同样的问题。

有没有人有类似的经验?有关如何解决这个问题的任何建议?

回答