[oe] Use '?=' instead of '=' for KERNEL_CC and KERNEL_LD

Dmitry Vinokurov d.vinokuroff at gmail.com
Wed Aug 26 12:39:07 UTC 2009


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?

diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass
index c5192d5..e457bf9 100644
--- a/classes/kernel.bbclass
+++ b/classes/kernel.bbclass
@@ -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}"

-- 
Best Regards, 
Dmitry Vinokurov 
<d.vinokuroff at gmail.com>





More information about the Openembedded-devel mailing list