]> code.ossystems Code Review - openembedded-core.git/commitdiff
kernel: Fix QA buildpaths warning for kernel modules
authorHe Zhe <zhe.he@windriver.com>
Mon, 5 Feb 2018 06:54:03 +0000 (14:54 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 16 Feb 2018 17:56:33 +0000 (17:56 +0000)
CFLAGS is unset during kernel_do_compile and thus the default build
path substitutions in DEBUG_PREFIX_MAP are missing.

To enhance reproducible build for kernel modules, such as lttng-modules
and cryptodev-module, this patch appends them, plus substitution of
STAGING_KERNEL_DIR, to KERNEL_CC.

Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/kernel-arch.bbclass

index cf0edb6173cc364885aa76911c06e275d36ddc4f..e0fe22b88b60a77156a9897a48dcec891a6d32f2 100644 (file)
@@ -57,7 +57,7 @@ HOST_LD_KERNEL_ARCH ?= "${TARGET_LD_KERNEL_ARCH}"
 TARGET_AR_KERNEL_ARCH ?= ""
 HOST_AR_KERNEL_ARCH ?= "${TARGET_AR_KERNEL_ARCH}"
 
-KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_KERNEL_ARCH} -fuse-ld=bfd"
+KERNEL_CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_KERNEL_ARCH} -fuse-ld=bfd ${DEBUG_PREFIX_MAP} -fdebug-prefix-map=${STAGING_KERNEL_DIR}=${KERNEL_SRC_PATH}"
 KERNEL_LD = "${CCACHE}${HOST_PREFIX}ld.bfd ${HOST_LD_KERNEL_ARCH}"
 KERNEL_AR = "${CCACHE}${HOST_PREFIX}ar ${HOST_AR_KERNEL_ARCH}"
 TOOLCHAIN = "gcc"