From: Harish Sadineni <[email protected]> When building with `TOOLCHAIN = "clang"`, the kernel's configuration check (do_kernel_configcheck) fails with:
kconfiglib.KconfigError: scripts/Kconfig.include:51: Sorry, this assembler is not supported. Fix by setting `CLANG_FLAGS = "-fintegrated-as"` in the environment when `TOOLCHAIN` contains "clang". This variable is used by the kernel build system (via scripts/Kconfig.include) to pass additional flags to clang during config checks, ensuring the assembler test passes. Acked-by: Bruce Ashfield <[email protected]> Signed-off-by: Harish Sadineni <[email protected]> --- meta/classes-recipe/kernel-yocto.bbclass | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta/classes-recipe/kernel-yocto.bbclass b/meta/classes-recipe/kernel-yocto.bbclass index e7fdeb5d4b..78a4a7ade7 100644 --- a/meta/classes-recipe/kernel-yocto.bbclass +++ b/meta/classes-recipe/kernel-yocto.bbclass @@ -603,6 +603,9 @@ python do_kernel_configcheck() { env['STRIP'] = d.getVar('KERNEL_STRIP') env['ARCH'] = d.getVar('ARCH') env['srctree'] = s + toolchain = d.getVar('TOOLCHAIN') or '' + if 'clang' in toolchain: + env['CLANG_FLAGS'] = " -fintegrated-as" try: configs = subprocess.check_output(['scc', '--configs', '-o', s + '/.kernel-meta'], env=env).decode('utf-8') -- 2.49.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#240514): https://lists.openembedded.org/g/openembedded-core/message/240514 Mute This Topic: https://lists.openembedded.org/mt/120178685/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
