From: Wenzong Fan Date: Wed, 20 Sep 2017 08:17:05 +0000 (-0700) Subject: kernel.bbclass: build host programs with native sysroots X-Git-Tag: 2017-10~127 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=37f20f2f7bdc8b964736c09371cd8f2342e4d5cb;p=openembedded-core.git kernel.bbclass: build host programs with native sysroots Allow to search header files and libs from native sysroots. For example, an expanded BUILD_CFLAGS includes: '-isystem/builddir/to/linux-yocto/recipe-sysroot-native/usr/include' And an expanded BUILD_LDFLAGS includes: '-L/builddir/to/linux-yocto/recipe-sysroot-native/usr/lib -Wl,-rpath-link,/builddir/to/linux-yocto/recipe-sysroot-native/usr/lib -Wl,-rpath,/builddir/to/linux-yocto/recipe-sysroot-native/usr/lib' Signed-off-by: Wenzong Fan Signed-off-by: Ross Burton --- diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass index 0ad522d167..756707a3c2 100644 --- a/meta/classes/kernel.bbclass +++ b/meta/classes/kernel.bbclass @@ -155,7 +155,7 @@ UBOOT_LOADADDRESS ?= "${UBOOT_ENTRYPOINT}" # Some Linux kernel configurations need additional parameters on the command line KERNEL_EXTRA_ARGS ?= "" -EXTRA_OEMAKE = " HOSTCC="${BUILD_CC}" HOSTCPP="${BUILD_CPP}"" +EXTRA_OEMAKE = " HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}"" KERNEL_ALT_IMAGETYPE ??= "" copy_initramfs() {