Skip to contentSkip to conversation

kernel-devsrc: account for HOSTCC and HOSTCXX

PATCH New Bruce Ashfield 1 participant 1 message Sep 10, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel-devsrc: account for HOSTCC and HOSTCXX

From: Bruce Ashfield <[email protected]>

Since commit 740d87766cb87f75c477 [kernel.bbclass: Configuration for environment with HOSTCXX], both HOSTCC and HOSTCXX are pickedup by the kernel build system as triggers to reconfigure if changed.

As with previous changes to devsrc, we replace the cross build variant, with what will be on target, so operations such as 'make scripts prepare' won't trigger a reconfiguration.

---
 meta/recipes-kernel/linux/kernel-devsrc.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-kernel/linux/kernel-devsrc.bb +2 -0
index 1482faa3be..81b1e36041 100644
@@ -275,6 +275,8 @@ do_install() {
     if [ -e "$kerneldir/build/include/config/auto.conf.cmd" ]; then
         sed -i 's/ifneq "$(CC)" ".*-linux-.*gcc.*$/ifneq "$(CC)" "gcc"/' "$kerneldir/build/include/config/auto.conf.cmd"
         sed -i 's/ifneq "$(LD)" ".*-linux-.*ld.bfd.*$/ifneq "$(LD)" "ld"/' "$kerneldir/build/include/config/auto.conf.cmd"
+        sed -i 's/ifneq "$(HOSTCXX)" ".*$/ifneq "$(HOSTCXX)" "g++"/' "$kerneldir/build/include/config/auto.conf.cmd"
+        sed -i 's/ifneq "$(HOSTCC)" ".*$/ifneq "$(HOSTCC)" "gcc"/' "$kerneldir/build/include/config/auto.conf.cmd"
         sed -i 's/ifneq "$(CC_VERSION_TEXT)".*\(gcc.*\)"/ifneq "$(CC_VERSION_TEXT)" "\1"/' "$kerneldir/build/include/config/auto.conf.cmd"
         sed -i 's/ifneq "$(srctree)" ".*"/ifneq "$(srctree)" "."/' "$kerneldir/build/include/config/auto.conf.cmd"
         # we don't build against the defconfig, so make sure it isn't the trigger for syncconfig
Signature · 1 line
2.19.1