kraj / meta-clang

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

`-fintegrated-as` required to compile kernel #705

Open mk3890 opened 1 year ago

mk3890 commented 1 year ago

Describe the bug Without adding -fintegrated-as to CC. Get the following error message:

ERROR: linux-raspberrypi-1_5.15.56+gitAUTOINC+3b1dc2f1fc_a90998a3e5-r0 do_kernel_configcheck: config analysis failed when running 'symbol_why.py --dotconfig /home/vagrant/git/yocto/build-rpi/tmp/work/raspberrypi4_64-poky-linux/linux-raspberrypi/1_5.15.56+gitAUTOINC+3b1dc2f1fc_a90998a3e5-r0/linux-raspberrypi4_64-standard-build/.config --mismatches --classify'

Digging into the log file the actual error is:

kconfiglib.KconfigError: scripts/Kconfig.include:50: Sorry, this assembler is not supported.

Kconfig.include calls as_version.sh, if the compiler is not gcc, it only looks for -fintegrated-as since the version will be the same as the compiler (which was already checked).

This is my first attempt at compiling a system with clang and I'm relatively new to Yocto so it's not clear to me why others would not experience this same issue as well. Doesn't appear to be a difference in linux-raspberrypi but I'm not certain.

My issue is solved just dropping here in case this is a valid fix for others.

Environment

kraj commented 1 year ago

are you using clang to compile kernel ?

mk3890 commented 1 year ago

Yes that's correct.