diff mbox

[05/18] Factorize and use isystem in BUILD_CPPFLAGS

Message ID 1350833261-8401-5-git-send-email-diorcet.yann@gmail.com
State Accepted
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>

Add isystem path to BUILD_CPPFLAGS.
Before that modification if a native package depends on native library, the compiler cannot found headers for native library (see linux kernel compilation and libelf on darwin)
---
 classes/c.oeclass |   14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

Comments

Esben Haabendal Feb. 27, 2013, 10:12 a.m. UTC | #1
Yann Diorcet <diorcet.yann@gmail.com> writes:

> From: Yann Diorcet <yann.diorcet@belledonne-communications.com>
>
> Add isystem path to BUILD_CPPFLAGS.
> Before that modification if a native package depends on native library, the compiler cannot found headers for native library (see linux kernel compilation and libelf on darwin)
> ---
>  classes/c.oeclass |   14 +++++---------
>  1 file changed, 5 insertions(+), 9 deletions(-)
>
> diff --git a/classes/c.oeclass b/classes/c.oeclass
> index 71d0064..1f3feb5 100644
> --- a/classes/c.oeclass
> +++ b/classes/c.oeclass
> @@ -8,24 +8,20 @@ CLASS_DEPENDS += "${C_DEPENDS}"
>  export CPPFLAGS = "${HOST_CPPFLAGS}"
>  export BUILD_CPPFLAGS
>  
> -BUILD_CPPFLAGS		?= "-U_FORTIFY_SOURCE"
> +BUILD_CPPFLAGS		?= "-U_FORTIFY_SOURCE -isystem ${BUILD_SYSROOT}${stage_includedir}"
>  MACHINE_CPPFLAGS	?= ""
>  SDK_CPPFLAGS		?= ""
>  
> -HOST_CPPFLAGS:native		 = "${BUILD_CPPFLAGS} \
> -	-isystem ${BUILD_SYSROOT}${stage_includedir}"
> -HOST_CPPFLAGS:cross		 = "${BUILD_CPPFLAGS} \
> -	-isystem ${BUILD_SYSROOT}${stage_includedir}"
> +HOST_CPPFLAGS:native		 = "${BUILD_CPPFLAGS}"
> +HOST_CPPFLAGS:cross		 = "${BUILD_CPPFLAGS}"
>  HOST_CPPFLAGS:machine		 = "${MACHINE_CPPFLAGS} \
>  	--sysroot=${MACHINE_SYSROOT}"
>  HOST_CPPFLAGS:sdk		 = "${SDK_CPPFLAGS} \
>  	--sysroot=${SDK_SYSROOT}"
> -HOST_CPPFLAGS:sdk-cross		 = "${BUILD_CPPFLAGS} \
> -	-isystem ${BUILD_SYSROOT}${stage_includedir}"
> +HOST_CPPFLAGS:sdk-cross		 = "${BUILD_CPPFLAGS}"
>  HOST_CPPFLAGS:canadian-cross	 = "${SDK_CPPFLAGS} \
>  	--sysroot=${SDK_SYSROOT}"
> -TARGET_CPPFLAGS:native		 = "${BUILD_CPPFLAGS} \
> -	-isystem ${BUILD_SYSROOT}${stage_includedir}"
> +TARGET_CPPFLAGS:native		 = "${BUILD_CPPFLAGS}"
>  TARGET_CPPFLAGS:cross		 = "${MACHINE_CPPFLAGS} \
>  	--sysroot=${MACHINE_SYSROOT}"
>  TARGET_CPPFLAGS:machine		 = "${MACHINE_CPPFLAGS} \

Merged to master, thanks.

/Esben
diff mbox

Patch

diff --git a/classes/c.oeclass b/classes/c.oeclass
index 71d0064..1f3feb5 100644
--- a/classes/c.oeclass
+++ b/classes/c.oeclass
@@ -8,24 +8,20 @@  CLASS_DEPENDS += "${C_DEPENDS}"
 export CPPFLAGS = "${HOST_CPPFLAGS}"
 export BUILD_CPPFLAGS
 
-BUILD_CPPFLAGS		?= "-U_FORTIFY_SOURCE"
+BUILD_CPPFLAGS		?= "-U_FORTIFY_SOURCE -isystem ${BUILD_SYSROOT}${stage_includedir}"
 MACHINE_CPPFLAGS	?= ""
 SDK_CPPFLAGS		?= ""
 
-HOST_CPPFLAGS:native		 = "${BUILD_CPPFLAGS} \
-	-isystem ${BUILD_SYSROOT}${stage_includedir}"
-HOST_CPPFLAGS:cross		 = "${BUILD_CPPFLAGS} \
-	-isystem ${BUILD_SYSROOT}${stage_includedir}"
+HOST_CPPFLAGS:native		 = "${BUILD_CPPFLAGS}"
+HOST_CPPFLAGS:cross		 = "${BUILD_CPPFLAGS}"
 HOST_CPPFLAGS:machine		 = "${MACHINE_CPPFLAGS} \
 	--sysroot=${MACHINE_SYSROOT}"
 HOST_CPPFLAGS:sdk		 = "${SDK_CPPFLAGS} \
 	--sysroot=${SDK_SYSROOT}"
-HOST_CPPFLAGS:sdk-cross		 = "${BUILD_CPPFLAGS} \
-	-isystem ${BUILD_SYSROOT}${stage_includedir}"
+HOST_CPPFLAGS:sdk-cross		 = "${BUILD_CPPFLAGS}"
 HOST_CPPFLAGS:canadian-cross	 = "${SDK_CPPFLAGS} \
 	--sysroot=${SDK_SYSROOT}"
-TARGET_CPPFLAGS:native		 = "${BUILD_CPPFLAGS} \
-	-isystem ${BUILD_SYSROOT}${stage_includedir}"
+TARGET_CPPFLAGS:native		 = "${BUILD_CPPFLAGS}"
 TARGET_CPPFLAGS:cross		 = "${MACHINE_CPPFLAGS} \
 	--sysroot=${MACHINE_SYSROOT}"
 TARGET_CPPFLAGS:machine		 = "${MACHINE_CPPFLAGS} \