Skip to contentSkip to conversation

cml1.bbclass: use consistent make flags for menuconfig

PATCH New Enrico Jörns 1 participant 1 message Dec 16, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cml1.bbclass: use consistent make flags for menuconfig

The class called 'make menuconfig' without any of the make variables and options set in EXTRA_OEMAKE, resulting in a quite different build environment than actually intended.

For the kernel.bbclass this was fixed in commit 8c616bc0 ("kernel: Use consistent make flags for menuconfig") by appending ${EXTRA_OEMAKE} to KCONFIG_CONFIG_COMMAND.

Instead of fixing this individually for additional recipes, we simply include ${EXTRA_OEMAKE} in KCONFIG_CONFIG_COMMAND by default.

For most class users, this change is directly visible in the generated .config file:

* For barebox and u-boot, the CONFIG_GCC_VERSION erroneously reflected the host GCC version before where it now correctly reflects the target toolchain's GCC.

* For u-boot, also the "Compiler: " line at the beginning of the .config now prints the target toolchain instead of the host ones.

* The kernel had this already set.

* busybox did not produce any difference.

Note that these projects might base some compile-time decisions on e.g. the actual compiler version used. Having the wrong one in the menuconfig-generated .config affects at least the visibility and consistency.

(cherry picked from commit 1b6ddd452837e67b500a84455a234f5edc8250a9)
---
 meta/classes-recipe/cml1.bbclass   | 2 +-
 meta/classes-recipe/kernel.bbclass | 3 ---
 2 files changed, 1 insertion(+), 4 deletions(-)
meta/classes-recipe/cml1.bbclass +1 -1
index 456305a315..5519fb61b3 100644
@@ -31,7 +31,7 @@ CROSS_CURSES_LIB = "-lncurses -ltinfo"
 CROSS_CURSES_INC = '-DCURSES_LOC="<curses.h>"'
 TERMINFO = "${STAGING_DATADIR_NATIVE}/terminfo"
 
-KCONFIG_CONFIG_COMMAND ??= "menuconfig"
+KCONFIG_CONFIG_COMMAND ??= "menuconfig ${EXTRA_OEMAKE}"
 KCONFIG_CONFIG_ENABLE_MENUCONFIG ??= "true"
 KCONFIG_CONFIG_ROOTDIR ??= "${B}"
 python do_menuconfig() {
meta/classes-recipe/kernel.bbclass +0 -3
index 4c1cb89a46..0d8bff2e33 100644
@@ -697,9 +697,6 @@ addtask savedefconfig after do_configure
 
 inherit cml1 pkgconfig
 
-# Need LD, HOSTLDFLAGS and more for config operations
-KCONFIG_CONFIG_COMMAND:append = " ${EXTRA_OEMAKE}"
-
 EXPORT_FUNCTIONS do_compile do_transform_kernel do_transform_bundled_initramfs do_install do_configure
 
 # kernel-base becomes kernel-${KERNEL_VERSION}
Signature · 1 line
2.47.3