[oe-commits] Richard Purdie : gcc-configure-target: Set native-system-header-dir for target gcc

git at git.openembedded.org git at git.openembedded.org
Wed Aug 1 22:15:03 UTC 2012


Module: openembedded-core.git
Branch: master
Commit: 404d2d490fc347203e89d274530c17fb5f0aa20f
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=404d2d490fc347203e89d274530c17fb5f0aa20f

Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date:   Wed Aug  1 08:01:28 2012 +0000

gcc-configure-target: Set native-system-header-dir for target gcc

Without this set, in the case host=target (which it does for on-target
gcc), the native header directory is set to the target sysroot with
no prefix. This means it would look for sdt.h on the build system
instead of in the target headers and this can lead to build failures
and is host contamination of the build.

The correct fix is to explicitly set the native header directory to
the correct location and then the headers get detected correctly.

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/recipes-devtools/gcc/gcc-configure-target.inc |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/meta/recipes-devtools/gcc/gcc-configure-target.inc b/meta/recipes-devtools/gcc/gcc-configure-target.inc
index b2f91b7..f41301f 100644
--- a/meta/recipes-devtools/gcc/gcc-configure-target.inc
+++ b/meta/recipes-devtools/gcc/gcc-configure-target.inc
@@ -3,4 +3,5 @@ require gcc-configure-common.inc
 EXTRA_OECONF_PATHS = " \
     --with-sysroot=/ \
     --with-build-sysroot=${STAGING_DIR_TARGET} \
+    --with-native-system-header-dir=${STAGING_DIR_TARGET}${target_includedir} \
     --with-gxx-include-dir=${includedir}/c++/"





More information about the Openembedded-commits mailing list