From 7fd06a57a1d91d8534721923f6e3951ec8220cec Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 14 Oct 2021 17:18:16 +0100 Subject: [PATCH] kernel: Rework kernel make flag to variable mappings In 2017 we added changes to pass the BUILD_CFLAGS into the kernel via BUILD_CC. This isn't really correct and the upstream kernel now has places to pass build cflags, ldflags and more. Update our kernel make flags to correctly use the kernel's variables. This addresses concerns raised by kernel developers. If this breaks some usecase please report it so we can work out how to fix it properly. Signed-off-by: Richard Purdie --- meta/classes/kernel.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index 5faa302a16..7b3c6bee96 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass @@ -226,8 +226,8 @@ UBOOT_LOADADDRESS ?= "${UBOOT_ENTRYPOINT}" # Some Linux kernel configurations need additional parameters on the command line KERNEL_EXTRA_ARGS ?= "" -EXTRA_OEMAKE = " HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}"" -EXTRA_OEMAKE += " HOSTCXX="${BUILD_CXX} ${BUILD_CXXFLAGS} ${BUILD_LDFLAGS}"" +EXTRA_OEMAKE = " HOSTCC="${BUILD_CC}" HOSTCFLAGS="${BUILD_CFLAGS}" HOSTLDFLAGS="${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}"" +EXTRA_OEMAKE += " HOSTCXX="${BUILD_CXX}" HOSTCXXFLAGS="${BUILD_CXXFLAGS}"" KERNEL_ALT_IMAGETYPE ??= "" -- 2.40.1