Patchwork [11/18] Add BUILD_CFLAGS/CPPFLAGS/LDFLAGS as HOST_CFLAGS/CPPFLAGS/LDFLAGS when compiling a kernel

login
register
mail settings
Submitter Yann Diorcet
Date Oct. 21, 2012, 3:27 p.m.
Message ID <1350833261-8401-11-git-send-email-diorcet.yann@gmail.com>
Download mbox | patch
Permalink /patch/193016/
State Superseded
Delegated to: Esben Haabendal
Headers show

Comments

Yann Diorcet - Oct. 21, 2012, 3:27 p.m.
From: Yann Diorcet <yann.diorcet@belledonne-communications.com>

Use BUILD flags for compiling kernel build machine tools
---
 classes/kernel.oeclass |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
Esben Haabendal - Feb. 27, 2013, 11:21 a.m.
Yann Diorcet <diorcet.yann@gmail.com> writes:

> From: Yann Diorcet <yann.diorcet@belledonne-communications.com>
>
> Use BUILD flags for compiling kernel build machine tools
> ---
>  classes/kernel.oeclass |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/classes/kernel.oeclass b/classes/kernel.oeclass
> index a9572b6..26a15cc 100644
> --- a/classes/kernel.oeclass
> +++ b/classes/kernel.oeclass
> @@ -53,10 +53,10 @@ do_compile_kernel () {
>  	fi
>  
>  	oe_runmake include/linux/version.h
> -	oe_runmake ${USE_kernel_imagetype}
> +	oe_runmake ${USE_kernel_imagetype} HOSTCFLAGS="${BUILD_CFLAGS}" HOSTCPPFLAGS="${BUILD_CPPFLAGS}" HOSTLDFLAGS="${BUILD_LDFLAGS}"
>  
>  	if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
> -		oe_runmake modules
> +		oe_runmake modules HOSTCFLAGS="${BUILD_CFLAGS}" HOSTCPPFLAGS="${BUILD_CPPFLAGS}" HOSTLDFLAGS="${BUILD_LDFLAGS}"
>  	else
>  		oenote "no modules to compile"
>  	fi

I have fixed this on master branch.

> @@ -74,6 +74,7 @@ do_compile () {
>  }
>  
>  CLASS_DEPENDS += "${KERNEL_UIMAGE_DEPENDS}"
> +CLASS_DEPENDS:>BUILD_OS_darwin = " native:libelf"
>  KERNEL_UIMAGE_DEPENDS = "${@['', 'native:u-boot-tools-mkimage']['${USE_kernel_imagetype}' == 'uImage']}"
>  
>  CLASS_FLAGS += "kernel_uimage \

Merged to master branch.

/Esbem

Patch

diff --git a/classes/kernel.oeclass b/classes/kernel.oeclass
index a9572b6..26a15cc 100644
--- a/classes/kernel.oeclass
+++ b/classes/kernel.oeclass
@@ -53,10 +53,10 @@  do_compile_kernel () {
 	fi
 
 	oe_runmake include/linux/version.h
-	oe_runmake ${USE_kernel_imagetype}
+	oe_runmake ${USE_kernel_imagetype} HOSTCFLAGS="${BUILD_CFLAGS}" HOSTCPPFLAGS="${BUILD_CPPFLAGS}" HOSTLDFLAGS="${BUILD_LDFLAGS}"
 
 	if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
-		oe_runmake modules
+		oe_runmake modules HOSTCFLAGS="${BUILD_CFLAGS}" HOSTCPPFLAGS="${BUILD_CPPFLAGS}" HOSTLDFLAGS="${BUILD_LDFLAGS}"
 	else
 		oenote "no modules to compile"
 	fi
@@ -74,6 +74,7 @@  do_compile () {
 }
 
 CLASS_DEPENDS += "${KERNEL_UIMAGE_DEPENDS}"
+CLASS_DEPENDS:>BUILD_OS_darwin = " native:libelf"
 KERNEL_UIMAGE_DEPENDS = "${@['', 'native:u-boot-tools-mkimage']['${USE_kernel_imagetype}' == 'uImage']}"
 
 CLASS_FLAGS += "kernel_uimage \