diff mbox

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

Message ID 1350833261-8401-11-git-send-email-diorcet.yann@gmail.com
State Superseded
Delegated to: Esben Haabendal
Headers show

Commit Message

Yann Diorcet Oct. 21, 2012, 3:27 p.m. UTC
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(-)

Comments

Esben Haabendal Feb. 27, 2013, 11:21 a.m. UTC | #1
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
diff mbox

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 \