我想使用clang为aarch64交叉编译,但出现错误。
我在Ubuntu 16.04上工作。
我用命令编译了源文件:
clang -target aarch64 -B/home/xxx/op-tee-v8/toolchains/aarch64/aarch64-linux-gnu/bin/ 1.cpp
1.cpp是我要交叉编译的文件。
然后我得到一个错误:
/home/xxx/op-tee-v8/toolchains/aarch64/aarch64-linux-gnu/bin/ld: unrecognised emulation mode: elf_x86_64
Supported emulations: aarch64linux aarch64elf aarch64elf32 aarch64elf32b aarch64elfb armelf armelfb aarch64linuxb aarch64linux32 aarch64linux32b armelfb_linux_eabi armelf_linux_eabi
collect2: error: ld returned 1 exit status
clang: error: linker (via gcc) command failed with exit code 1 (use -v to see invocation)