]> code.ossystems Code Review - openembedded-core.git/commitdiff
kernel.bbclass: build host programs with native sysroots
authorWenzong Fan <wenzong.fan@windriver.com>
Wed, 20 Sep 2017 08:17:05 +0000 (01:17 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 21 Sep 2017 08:24:01 +0000 (09:24 +0100)
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 <wenzong.fan@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/kernel.bbclass

index 0ad522d1671c529d046fac49bb6bb963f2a6064f..756707a3c257de093fddaf9cc792d671e1e2e631 100644 (file)
@@ -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() {