]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
kernel-yocto: do_kernel_configme: Fix silent sysroot poisoning error
authorIoan-Adrian Ratiu <adrian.ratiu@ni.com>
Tue, 30 Aug 2016 16:49:06 +0000 (12:49 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 1 Sep 2016 20:57:44 +0000 (21:57 +0100)
commitff54d7fcc3ff9e0250dd544b83bafd74d3744404
tree7b6905065c4be7e7d18364a54ab9cff7bc995013
parentdbb3ea811665d3af10f883816043f79ee7d6df21
kernel-yocto: do_kernel_configme: Fix silent sysroot poisoning error

do_kernel_configme calls merge_config.sh (installed in the sysroot by
the kern-tools-native recipe) which may invoke the compiler to complete
the configuration process.

Depending on the build (and dependencies), this may error due to sysroot poisoning [1].

The errors are similar to:

  make[1]: Entering directory '4.1+gitAUTOINC+a7e53ecc27-r0/linux-x64-standard-build' HOSTCC  scripts/basic/fixdep
  work-shared/x64/kernel-source/scripts/basic/fixdep.c:106:23: fatal error: sys/types.h: No such file or directory
  compilation terminated.
  make[2]: *** [work-shared/x64/kernel-source/scripts/basic/Makefile:22: scripts/basic/x86_64-nilrt-linux-fixdep] Error 1

Adding $TOOLCHAIN_OPTIONS to $CFLAGS before calling merge_configs.sh
fixes the error because $TOOLCHAIN_OPTIONS defines the sysroot and make
uses it to correctly compile & fill all missing kernel config options.

[1] http://lists.openembedded.org/pipermail/openembedded-core/2014-October/098253.html

Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/kernel-yocto.bbclass