Skip to contentSkip to conversation

kernel.bbclass: Configuration for environment with HOSTCXX

PATCH New Marek Vasut 1 participant 1 message Mar 12, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel.bbclass: Configuration for environment with HOSTCXX

From: Zhang Qiang <[email protected]>

When compiling xilinx-zynq board linux-kernel-dev(v5.8) if "GCC_PLUGINS=y", The following error will appear:

"HOSTCXX -fPIC scripts/gcc-plugins/arm_ssp_per_task_plugin.o fatal error: gmp.h: No such file or directory"

the GCC_PLUGINS depend on return result of gcc-plugin.sh execution however in gcc-plugin.sh use HOSTCC to detect the feature of GNU extension of gcc, this will result that HOSTCC can compile the file successfully, but HOSTCXX is used in the actual compilation process.

---
NOTE: I am running into the same problem when compiling v5.10.y, so
it would be helpful to backport this patch.
740d87766c ("kernel.bbclass: Configuration for environment with HOSTCXX")

---
 meta/classes/kernel.bbclass | 2 ++
 1 file changed, 2 insertions(+)
meta/classes/kernel.bbclass +2 -0
index 83a574efcd..22b1224d79 100644
@@ -194,6 +194,8 @@ UBOOT_LOADADDRESS ?= "${UBOOT_ENTRYPOINT}"
 KERNEL_EXTRA_ARGS ?= ""
 
 EXTRA_OEMAKE = " HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}""
+EXTRA_OEMAKE += " HOSTCXX="${BUILD_CXX} ${BUILD_CXXFLAGS} ${BUILD_LDFLAGS}""
+
 KERNEL_ALT_IMAGETYPE ??= ""
 
 copy_initramfs() {
Signature · 1 line
2.30.1