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

2018-02-08 Thread Bruce Ashfield

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...@windriver.com wrote:

From: He Zhe 

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 
---
  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 


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




--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

2018-02-07 Thread He Zhe
Hi Bruce,

I should have cc this to you.

Thanks,
Zhe

On 2018年02月05日 14:54, zhe...@windriver.com wrote:
> From: He Zhe 
>
> 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 
> ---
>  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}"
>  KERNEL_LD = "${CCACHE}${HOST_PREFIX}ld.bfd ${HOST_LD_KERNEL_ARCH}"
>  KERNEL_AR = "${CCACHE}${HOST_PREFIX}ar ${HOST_AR_KERNEL_ARCH}"
>  TOOLCHAIN = "gcc"

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

2018-02-04 Thread zhe.he
From: He Zhe 

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 
---
 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}"
 KERNEL_LD = "${CCACHE}${HOST_PREFIX}ld.bfd ${HOST_LD_KERNEL_ARCH}"
 KERNEL_AR = "${CCACHE}${HOST_PREFIX}ar ${HOST_AR_KERNEL_ARCH}"
 TOOLCHAIN = "gcc"
-- 
2.8.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core