]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix searching for C++ system headers for cross compilers
authorAndreas Schwab <schwab@linux-m68k.org>
Sat, 15 Oct 2011 18:08:45 +0000 (20:08 +0200)
committerAndreas Schwab <schwab@linux-m68k.org>
Sat, 15 Oct 2011 18:44:10 +0000 (20:44 +0200)
ChangeLog
configure
configure.in

index 414611a93c32159b7e202193c918b81305efd1f9..2771cd39ccccaca60f1a57285b0e9404ee8f6899 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-10-15  Andreas Schwab  <schwab@linux-m68k.org>
+
+       * configure.in: Also look in $cxxmachine/include for C++ system
+       headers.
+
 2011-09-27  Liubov Dmitrieva  <liubov.dmitrieva@gmail.com>
 
        * sysdeps/x86_64/multiarch/Makefile: (sysdep_routines): Add
index b59049f63901fa5fc349f75b1c145b15e5af60ea..ec1d6514a47273043525163cb195b1eb4d25e0e7 100755 (executable)
--- a/configure
+++ b/configure
@@ -5372,11 +5372,16 @@ if test -n "$sysheaders"; then
   SYSINCLUDES="$SYSINCLUDES \
 -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
   if test -n "$CXX"; then
+    CXX_SYSINCLUDES=
     cxxversion=`$CXX -dumpversion 2>&5` &&
     cxxmachine=`$CXX -dumpmachine 2>&5` &&
-    cxxheaders=`$CXX -print-file-name=../../../../include/c++/`"$cxxversion" &&
-    CXX_SYSINCLUDES="-isystem $cxxheaders \
+    for d in include "$cxxmachine/include"; do
+      i=../../../../$d/c++/$cxxversion
+      cxxheaders=`$CXX -print-file-name="$i"` &&
+      test "x$cxxheaders" != x && test "x$i" != "x$cxxheaders" &&
+      CXX_SYSINCLUDES="$CXX_SYSINCLUDES -isystem $cxxheaders \
 -isystem $cxxheaders/$cxxmachine -isystem $cxxheaders/backward"
+    done
   fi
 fi
 
index b2949b4958b62383191b92d0372c7468794ae5ed..6977fe1015a6d6728d5d78d4bc3181c13d7d62d9 100644 (file)
@@ -1061,11 +1061,16 @@ if test -n "$sysheaders"; then
   SYSINCLUDES="$SYSINCLUDES \
 -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
   if test -n "$CXX"; then
+    CXX_SYSINCLUDES=
     cxxversion=`$CXX -dumpversion 2>&AS_MESSAGE_LOG_FD` &&
     cxxmachine=`$CXX -dumpmachine 2>&AS_MESSAGE_LOG_FD` &&
-    cxxheaders=`$CXX -print-file-name=../../../../include/c++/`"$cxxversion" &&
-    CXX_SYSINCLUDES="-isystem $cxxheaders \
+    for d in include "$cxxmachine/include"; do
+      i=../../../../$d/c++/$cxxversion
+      cxxheaders=`$CXX -print-file-name="$i"` &&
+      test "x$cxxheaders" != x && test "x$i" != "x$cxxheaders" &&
+      CXX_SYSINCLUDES="$CXX_SYSINCLUDES -isystem $cxxheaders \
 -isystem $cxxheaders/$cxxmachine -isystem $cxxheaders/backward"
+    done
   fi
 fi
 AC_SUBST(SYSINCLUDES)