From 6113de76c88206be1bab5a066b1b90f811e39de2 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Fri, 7 Feb 2020 09:52:04 -0500 Subject: kern-tools: fix merge_config when LD contains parameters To ensure that the kernel linker is used when allno/mod/yes config merge_config steps were executed, the call to make was tweaked to explicitly pass LD. But since the variable wasn't quoted, any parameters to LD (like the sysroot) were mistakenly passed to make, and hence could trigger an error on some architectures. We also tweak the logging to hightlight errors like this in the future and avoid losing it in the noise of merge configs sometimes overly verbose output. (From OE-Core rev: a60c4c116efecd7a6ee5a11b1d366bb00b9d23ce) Signed-off-by: Bruce Ashfield Signed-off-by: Richard Purdie --- meta/classes/kernel-yocto.bbclass | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'meta/classes/kernel-yocto.bbclass') diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass index 918d101d3d..44863adc27 100644 --- a/meta/classes/kernel-yocto.bbclass +++ b/meta/classes/kernel-yocto.bbclass @@ -352,10 +352,14 @@ do_kernel_configme() { bbfatal_log "Could not find configuration queue (${meta_dir}/config.queue)" fi - CFLAGS="${CFLAGS} ${TOOLCHAIN_OPTIONS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}" CC="${KERNEL_CC}" LD="${KERNEL_LD}" ARCH=${ARCH} merge_config.sh -O ${B} ${config_flags} ${configs} - + CFLAGS="${CFLAGS} ${TOOLCHAIN_OPTIONS}" HOSTCC="${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS}" HOSTCPP="${BUILD_CPP}" CC="${KERNEL_CC}" LD="${KERNEL_LD}" ARCH=${ARCH} merge_config.sh -O ${B} ${config_flags} ${configs} > ${meta_dir}/cfg/merge_config_build.log 2>&1 if [ $? -ne 0 -o ! -f ${B}/.config ]; then - bbfatal_log "Could not configure ${KMACHINE}-${LINUX_KERNEL_TYPE}" + bberror "Could not generate a .config for ${KMACHINE}-${LINUX_KERNEL_TYPE}" + if [ ${KCONF_AUDIT_LEVEL} -gt 1 ]; then + bbfatal_log "`cat ${meta_dir}/cfg/merge_config_build.log`" + else + bbfatal_log "Details can be found at: ${S}/${meta_dir}/cfg/merge_config_build.log" + fi fi if [ ! -z "${LINUX_VERSION_EXTENSION}" ]; then -- cgit v1.2.3-54-g00ecf