aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2011-10-15 20:08:45 +0200
committerAndreas Schwab <schwab@linux-m68k.org>2011-10-15 20:44:10 +0200
commit7872cfb09feb6f4aabb62a8aea8035e6c3ce2ddb (patch)
tree667e8897c76c34d2826dfbf3f8cc54abda09c2a6 /configure
parent2d1f3a4db65d2731a695dee6b973accea8b9adc0 (diff)
downloadglibc-7872cfb09feb6f4aabb62a8aea8035e6c3ce2ddb.zip
glibc-7872cfb09feb6f4aabb62a8aea8035e6c3ce2ddb.tar.gz
glibc-7872cfb09feb6f4aabb62a8aea8035e6c3ce2ddb.tar.bz2
Fix searching for C++ system headers for cross compilers
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure9
1 files changed, 7 insertions, 2 deletions
diff --git a/configure b/configure
index b59049f..ec1d651 100755
--- 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