ld.lld command failed when build the hello_world sample in zephyr using clang6.0

╄→尐↘猪︶ㄣ 提交于 2021-02-11 14:11:42

问题


I want to build samples/subsys/power/device_pm using clang6.0 so I do as follows:

  1. export ZEPHYR_TOOLCHAIN_VARIANT=llvm
  2. mkdir build and cd build
  3. cmake -DBOARD=reel_board ..
  4. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!