Use '?=' instead of '=' for KERNEL_CC and KERNEL_LD
Hello,
Recently I've builded kernel using foreign toolchain and thought that possibility to set KERNEL_CC (and maybe KERNEL_LD too) in local.conf will be more convenient for developers than if it will be hard-coded in kernel.bbclass. Setting HOST_PREFIX is another way of course, but it may have influence on another things. I suggest it because in my case ?= was more convenient and I thought that it may be good thing in general case too.
What community think about it?
classes/kernel.bbclass +0 -0
@@ -54,8 +54,8 @@ HOST_CC_KERNEL_ARCH ?= "${TARGET_CC_KERNEL_ARCH}"
TARGET_LD_KERNEL_ARCH ?= ""HOST_LD_KERNEL_ARCH ?= "${TARGET_LD_KERNEL_ARCH}"
-KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX} ${HOST_CC_KERNEL_ARCH}" -KERNEL_LD = "${LD}${KERNEL_LDSUFFIX} ${HOST_LD_KERNEL_ARCH}" +KERNEL_CC ?= "${CCACHE}${HOST_PREFIX}gcc${KERNEL_CCSUFFIX} ${HOST_CC_KERNEL_ARCH}" +KERNEL_LD ?= "${LD}${KERNEL_LDSUFFIX} ${HOST_LD_KERNEL_ARCH}"
# Where built kernel lies in the kernel tree KERNEL_OUTPUT ?= "arch/${ARCH}/boot/${KERNEL_IMAGETYPE}"
Signature · 1 line
Best Regards, Dmitry Vinokurov <[email protected]>