我想交叉编译在Ubuntu x64 PC上与ARM交叉编译器.
PC
上操作的poclcc生成它的ARM可执行文件。
我试过以下几种方法:
1. download llvm9, make and install to Ubuntu
$cmake -G "Unix Makefiles" ../llvm-9.0.0.src -DCMAKE_INSTALL_PREFIX=/home/llvm -DCMAKE_BUILD_TYPE=Release
$make -j12
$sudo make install
2. download pocl1.4, make and install to Ubuntu
$cmake -DLLC_TRIPLE=aarch64-linux-gnu -DLLC_HOST_CPU=cortex-a53 -DWITH_LLVM_CONFIG=/home/llvm_ubuntu/bin/llvm-config ..
$make
$sudo make install但我错了。
/usr/bin/ld: unrecognised emulation mode: aarch64linux
Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 elf_iamcu i386linux elf_l1om elf_k1om i386pep i386pe
error: linker command failed with exit code 1 (use -v to see invocation)有人想办法解决这个问题吗?
发布于 2020-08-05 14:55:47
从pocl文件中复制:
现在可以交叉编译x86-64上的pocl以在ARM/MIPS/etc上运行,但只有LLVM没有构建。有一个ToolchainExample.cmake文件;以不同的名称复制它,然后按照文件中的说明操作。
ToolchainExample.cmake几乎拥有你需要知道的一切。
https://stackoverflow.com/questions/61094936
复制相似问题