kraj / meta-clang

Clang C/C++ cross compiler and runtime for OpenEmbedded/Yocto Project
MIT License
153 stars 198 forks source link

kernel build error #856

Open lxy1579 opened 12 months ago

lxy1579 commented 12 months ago

Describe the bug some kernel configuration options are disabled after do_configure.

To Reproduce Steps to reproduce the behavior: bitbake virtual/kernel -c configure

Expected behavior git diff .oldconfig .config

-c option can't use with '-fuse-ld=lld'

kraj commented 12 months ago

we do not use clang to compile by default for kernel it still uses gcc and binutils. Maybe you can disable lld to build kenrel.

KERNEL_LD = "${CCACHE}${HOST_PREFIX}ld.bfd ${HOST_LD_KERNEL_ARCH}"
lxy1579 commented 12 months ago

It will be OK if I compile kernel by removing -fuse-ld=lld from KERNEL_CC, but I also set KERNEL_LD = "${CCACHE}${HOST_PREFIX}ld.lld". Verify that the final image(vmlinux) is also generated through ld.lld link

lxy1579 commented 10 months ago

we do not use clang to compile by default for kernel it still uses gcc and binutils. Maybe you can disable lld to build kenrel.

KERNEL_LD = "${CCACHE}${HOST_PREFIX}ld.bfd ${HOST_LD_KERNEL_ARCH}"

Is there a plan to support LLVM=1 parameter to kernel build?