0

我想使用 clang6.0 构建 samples/subsys/power/device_pm 所以我执行以下操作:

  1. 导出 ZEPHYR_TOOLCHAIN_VARIANT=llvm
  2. mkdir 构建和 cd 构建
  3. cmake -DBOARD=reel_board ..
  4. 制作

然后,我得到了一些错误:

[ 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

有什么建议吗?非常感谢!

4

1 回答 1

0

reel_board 是 ARM 吗?

不幸的是,Clang 不支持 ARM。

于 2019-11-29T14:48:25.163 回答