Fail to build lkl using Clang-11
pcy190 opened this issue · comments
HAPPY commented
Hi all,
I want to build lkl using clang.
I am using make ARCH=lkl CC=clang LD=ld.lld menuconfig
and cp .config arch/lkl/configs/defconfig
,
after that I use
make CC=clang -C tools/lkl
to build the lkl. But it failed with various errors like below:
init/init_task.c:32:21: error: initializer element is not a compile-time constant
.cputime_atomic = INIT_CPUTIME_ATOMIC,
^~~~~~~~~~~~~~~~~~~
./include/linux/sched/signal.h:52:12: note: expanded from macro 'INIT_CPUTIME_ATOMIC'
.utime = ATOMIC64_INIT(0), \
^~~~~~~~~~~~~~~~
15 warnings generated.
/tmp/main-cfea46.s: Assembler messages:
/tmp/main-cfea46.s:5874: Fatal error: bad .section directive: want a,l,w,x,M,S,G,T in string
clang: error: assembler command failed with exit code 1 (use -v to see invocation)
make[2]: *** [scripts/Makefile.build:281: init/main.o] Error 1
make[1]: *** [Makefile:1084: init] Error 2
make: *** [Makefile:66: linux/tools/lkl/lib/lkl.o] Error 2
make: Leaving directory 'linux/tools/lkl'
My clang version is 11.0.0
I wonder the proper way to build lkl using clang.
BTW, I find the wiki in 2015 which describes the clang build, but the build_ll
branch is gone :)
Thanks in advance.
docfate111 commented
is this fixed?