]> code.ossystems Code Review - openembedded-core.git/commitdiff
kernel: Rework kernel make flag to variable mappings
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 14 Oct 2021 16:18:16 +0000 (17:18 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 16 Oct 2021 16:37:45 +0000 (17:37 +0100)
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 <richard.purdie@linuxfoundation.org>
meta/classes/kernel.bbclass

index 5faa302a16528c1013eb8f8580cfade94a6a740e..7b3c6bee962429097aae706cf62585cb7e4cf5ae 100644 (file)
@@ -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 ??= ""