[OE-core] [PATCH] kernel: Fix QA buildpaths warning for kernel modules

Bruce Ashfield bruce.ashfield at windriver.com
Thu Feb 8 16:02:07 UTC 2018


On 02/07/2018 09:35 PM, He Zhe wrote:
> Hi Bruce,
> 
> I should have cc this to you.
> 

Thanks, I had missed the original patch. See below for comments.

> Thanks,
> Zhe
> 
> On 2018年02月05日 14:54, zhe.he at windriver.com wrote:
>> From: He Zhe <zhe.he at windriver.com>
>>
>> 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 at windriver.com>
>> ---
>>   meta/classes/kernel-arch.bbclass | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/meta/classes/kernel-arch.bbclass b/meta/classes/kernel-arch.bbclass
>> index cf0edb6..e0fe22b 100644
>> --- a/meta/classes/kernel-arch.bbclass
>> +++ b/meta/classes/kernel-arch.bbclass
>> @@ -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}"

Generally speaking we do not want to leak build system flags/options
into the kernel build, but in this case the flags are related to the
symbols/compiler versus flags influencing the code in the executables
.. and they are similar to the other flags we do pass into the build.

So no concerns from me.

Acked-by: Bruce Ashfield <bruce.ashfield at windriver.com>

>>   KERNEL_LD = "${CCACHE}${HOST_PREFIX}ld.bfd ${HOST_LD_KERNEL_ARCH}"
>>   KERNEL_AR = "${CCACHE}${HOST_PREFIX}ar ${HOST_AR_KERNEL_ARCH}"
>>   TOOLCHAIN = "gcc"
> 




More information about the Openembedded-core mailing list