HarmonyOS 鸿蒙Next交叉编译错误 ld.lld: error:--fix-cortex-a53-843419 is only supported on AArch64 targets
HarmonyOS 鸿蒙Next交叉编译错误 ld.lld: error:–fix-cortex-a53-843419 is only supported on AArch64 targets
在交叉编译libiconv.so的时候出现错误 请大神帮忙看看是什么问题 谢谢!
clang++ -v -DXCODE_ARMLINUX -DXCODE_64 -O2 -fPIC -D__x86_64__ -D__LP64__ --target=aarch64-linux-ohos --sysroot=/home/openharmony/ohos-sdk/native/sysroot -march=armv8-a -mfloat-abi=softfp -DXZLIB8 -L/usr/lib64 -lm -lpthread localcharset.o iconv.o relocatable.o -fPIC -g -shared -o libiconv.so
OHOS (dev) clang version 15.0.4 (llvm-project d1aa604d90b55a96aa22af9992d170fccbd41938)
Target: aarch64-unknown-linux-ohos
Thread model: posix
InstalledDir: /home/openharmony/ohos-sdk/native/llvm/bin
“/home/openharmony/ohos-sdk/native/llvm/bin/ld.lld” --sysroot=/home/openharmony/ohos-sdk/native/sysroot -EL --fix-cortex-a53-843419 -z now -z relro -z max-page-size=4096 --hash-style=gnu --hash-style=both --enable-new-dtags --eh-frame-hdr -m aarch64linux -shared -o libiconv.so /home/openharmony/ohos-sdk/native/sysroot/usr/lib/aarch64-linux-ohos/crti.o /home/openharmony/ohos-sdk/native/llvm/lib/clang/15.0.4/lib/aarch64-linux-ohos/clang_rt.crtbegin.o -L/usr/lib64 -L/home/openharmony/ohos-sdk/native/llvm/lib/clang/15.0.4/lib/aarch64-linux-ohos -L/home/openharmony/ohos-sdk/native/sysroot/usr/lib/ -L/home/openharmony/ohos-sdk/native/llvm/bin/…/lib/aarch64-linux-ohos/ -L/home/openharmony/ohos-sdk/native/sysroot/usr/lib/aarch64-linux-ohos/ -lm -lpthread localcharset.o iconv.o relocatable.o -lc++ -lc++abi -lunwind -lm /home/openharmony/ohos-sdk/native/llvm/lib/clang/15.0.4/lib/aarch64-linux-ohos/libclang_rt.builtins.a -l:libunwind.a -lc /home/openharmony/ohos-sdk/native/llvm/lib/clang/15.0.4/lib/aarch64-linux-ohos/libclang_rt.builtins.a -l:libunwind.a /home/openharmony/ohos-sdk/native/llvm/lib/clang/15.0.4/lib/aarch64-linux-ohos/clang_rt.crtend.o /home/openharmony/ohos-sdk/native/sysroot/usr/lib/aarch64-linux-ohos/crtn.o
ld.lld: error: --fix-cortex-a53-843419 is only supported on AArch64 targets
clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [makefile:107: libiconv.so] Error 1
make[1]: Leaving directory '/home/openharmony/XWorkSpaces/Unix/XDll/libiconv’
关于HarmonyOS 鸿蒙Next交叉编译错误 ld.lld: error:–fix-cortex-a53-843419 is only supported on AArch64 targets的问题,您也可以访问:https://www.itying.com/category-93-b0.html 联系官网客服。
已解决 加上-march=armv8-a编译选项 现在错误变成了
ld.lld: error: /home/openharmony/ohos-sdk/native/sysroot/usr/lib/aarch64-linux-ohos/crti.o is incompatible with elf64-x86-64
ld.lld: error: /home/openharmony/ohos-sdk/native/llvm/lib/clang/15.0.4/lib/aarch64-linux-ohos/clang_rt.crtbegin.o is incompatible with elf64-x86-64