summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorIoan-Adrian Ratiu <adrian.ratiu@ni.com>2016-08-30 12:49:06 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-05 11:56:01 +0100
commitd1528403d5a48592ca0c85772d5175ac1cd20f98 (patch)
treefa53e2ef199fc4768c6be05016711cbde517c1bb /meta/classes
parent5ea48fa5ee1201e17bac7e9cf6d48c3795216911 (diff)
downloadpoky-d1528403d5a48592ca0c85772d5175ac1cd20f98.tar.gz
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 (From OE-Core rev: 4b770d62472d1b1a26366de0a1742db240aa5239) 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>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/kernel-yocto.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 9b8bab63ca..068378f067 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -255,7 +255,7 @@ do_kernel_configme() {
255 bbfatal_log "Could not find configuration queue (${meta_dir}/config.queue)" 255 bbfatal_log "Could not find configuration queue (${meta_dir}/config.queue)"
256 fi 256 fi
257 257
258 ARCH=${ARCH} merge_config.sh -O ${B} ${config_flags} ${configs} > ${meta_dir}/cfg/merge_config_build.log 2>&1 258 CFLAGS="${CFLAGS} ${TOOLCHAIN_OPTIONS}" ARCH=${ARCH} merge_config.sh -O ${B} ${config_flags} ${configs} > ${meta_dir}/cfg/merge_config_build.log 2>&1
259 if [ $? -ne 0 ]; then 259 if [ $? -ne 0 ]; then
260 bbfatal_log "Could not configure ${KMACHINE}-${LINUX_KERNEL_TYPE}" 260 bbfatal_log "Could not configure ${KMACHINE}-${LINUX_KERNEL_TYPE}"
261 fi 261 fi