[oe-commits] Richard Tollerton : gcc: Ensure c++ includes are in /usr/include/c++/ ${BINV}

git at git.openembedded.org git at git.openembedded.org
Thu Jul 10 16:40:11 UTC 2014


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

Author: Richard Tollerton <rich.tollerton at ni.com>
Date:   Thu Jul  3 17:00:26 2014 -0500

gcc: Ensure c++ includes are in /usr/include/c++/${BINV}

It was observed that code using STLport 4.6 fails to compile under the
SDK with the following error message:

.../includes/cstddef:38:46: fatal error: ../4.7.2/cstddef: No such file
or directory

STLport 4.6 (screwily) assumes that the C++ system headers live in a
gcc-versioned subdirectory, for gcc>=3.0; cf
http://sourceforge.net/p/stlport/code/ci/STLport-4.6-patch/tree/stlport/config/stl_gcc.h#l269.

This assumption is *almost always* valid, because that matches the
default setting of --with-gxx-include-dir. We can match that behavior by
appending "/${BINV}" to our own --with-gxx-include-dir settings.

Natinst-CAR-ID: 446449
Natinst-Reviewboard-ID: 57209
Acked-by: Ken Sharp <ken.sharp at ni.com>
Acked-by: Ben Shelton <ben.shelton at ni.com>
Signed-off-by: Richard Tollerton <rich.tollerton at ni.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>

---

 meta/recipes-devtools/gcc/gcc-4.8.inc            | 2 +-
 meta/recipes-devtools/gcc/gcc-cross-canadian.inc | 2 +-
 meta/recipes-devtools/gcc/gcc-cross.inc          | 2 +-
 meta/recipes-devtools/gcc/gcc-runtime.inc        | 2 +-
 meta/recipes-devtools/gcc/gcc-target.inc         | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-devtools/gcc/gcc-4.8.inc b/meta/recipes-devtools/gcc/gcc-4.8.inc
index 9f2928b..2816f13 100644
--- a/meta/recipes-devtools/gcc/gcc-4.8.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.8.inc
@@ -115,7 +115,7 @@ EXTRA_OECONF_INTERMEDIATE = "--disable-libmudflap \
 EXTRA_OECONF_append_libc-uclibc = " --disable-decimal-float "
 
 EXTRA_OECONF_PATHS = " \ 
-                      --with-gxx-include-dir=${STAGING_DIR_TARGET}${target_includedir}/c++ \ 
+                      --with-gxx-include-dir=${STAGING_DIR_TARGET}${target_includedir}/c++/${BINV} \ 
                       --with-sysroot=${STAGING_DIR_TARGET} \ 
                       --with-build-sysroot=${STAGING_DIR_TARGET}"
 
diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
index 63adae8..f0a03a6 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
@@ -9,7 +9,7 @@ GCCMULTILIB = "--enable-multilib"
 
 require gcc-configure-common.inc
 
-EXTRA_OECONF_PATHS = "--with-gxx-include-dir=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}${target_includedir}/c++ \
+EXTRA_OECONF_PATHS = "--with-gxx-include-dir=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS}${target_includedir}/c++/${BINV} \
                       --with-build-time-tools=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin \
                       --with-sysroot=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS} \
                       --with-build-sysroot=${STAGING_DIR_TARGET}"
diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc
index 0bf29e3..cf3e5e8 100644
--- a/meta/recipes-devtools/gcc/gcc-cross.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross.inc
@@ -21,7 +21,7 @@ EXTRA_OECONF += "--disable-libunwind-exceptions \
                  --with-system-zlib "
 
 EXTRA_OECONF_PATHS = " \
-                      --with-gxx-include-dir=${STAGING_DIR_TARGET}${target_includedir}/c++ \
+                      --with-gxx-include-dir=${STAGING_DIR_TARGET}${target_includedir}/c++/${BINV} \
                       --with-sysroot=${STAGING_DIR_TARGET} \
                       --with-build-sysroot=${STAGING_DIR_TARGET}"
 
diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc
index 70f9e0e..974c80c 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -3,7 +3,7 @@ require gcc-configure-common.inc
 CXXFLAGS := "${@oe_filter_out('-fvisibility-inlines-hidden', '${CXXFLAGS}', d)}"
 
 EXTRA_OECONF_PATHS = " \
-    --with-gxx-include-dir=${includedir}/c++/ \
+    --with-gxx-include-dir=${includedir}/c++/${BINV} \
     --with-sysroot=${STAGING_DIR_TARGET} \
     --with-build-sysroot=${STAGING_DIR_TARGET}"
 
diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc
index de906d6..59c554d 100644
--- a/meta/recipes-devtools/gcc/gcc-target.inc
+++ b/meta/recipes-devtools/gcc/gcc-target.inc
@@ -5,7 +5,7 @@ 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++/"
+    --with-gxx-include-dir=${includedir}/c++/${BINV}"
 
 EXTRA_OECONF_FPU = "${@get_gcc_fpu_setting(bb, d)}"
 



More information about the Openembedded-commits mailing list