问题
I want to build samples/subsys/power/device_pm using clang6.0 so I do as follows:
- export ZEPHYR_TOOLCHAIN_VARIANT=llvm
- mkdir build and cd build
- cmake -DBOARD=reel_board ..
- make
Then, I got some errors:
[ 95%] Linking C executable zephyr_prebuilt.elf
clang-6.0: warning: argument unused during compilation: '--specs=nosys.specs' [-Wunused-command-line-argument]
clang-6.0: warning: argument unused during compilation: '-u _OffsetAbsSyms' [-Wunused-command-line-argument]
clang-6.0: warning: argument unused during compilation: '-u _ConfigAbsSyms' [-Wunused-command-line-argument]
clang-6.0: warning: argument unused during compilation: '-nopie' [-Wunused-command-line-argument]
/usr/local/bin/ld.lld: error: linker.cmd:189: { expected, but got ALIGN_WITH_INPUT
>>> _bt_channels_area : ALIGN_WITH_INPUT SUBALIGN(4)
>>> ^
clang-6.0: error: ld.lld command failed with exit code 1 (use -v to see invocation)
zephyr/CMakeFiles/zephyr_prebuilt.dir/build.make:101: recipe for target 'zephyr/zephyr_prebuilt.elf' failed
make[2]: *** [zephyr/zephyr_prebuilt.elf] Error 1
CMakeFiles/Makefile2:557: recipe for target 'zephyr/CMakeFiles/zephyr_prebuilt.dir/all' failed
make[1]: *** [zephyr/CMakeFiles/zephyr_prebuilt.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Is there any suggestion? Thanks a lot!
回答1:
reel_board is ARM right?
ARM is not supported for Clang yet unfortunately.
来源:https://stackoverflow.com/questions/59089857/ld-lld-command-failed-when-build-the-hello-world-sample-in-zephyr-using-clang6-0