mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 12:30:06 +00:00
Fix C++ header directory detection for non-standard paths.
Stop assuming specific path layouts for C++ headers, and instead use an autodetection method that looks for paths with '/[cg]++' in the g++ include list.
This commit is contained in:
parent
800938a126
commit
6706074627
@ -1,3 +1,8 @@
|
||||
2012-11-24 Adam Conrad <adconrad@0c3.net>
|
||||
|
||||
* configure.in: Autodetect C++ header directories.
|
||||
* configure: Regenerated.
|
||||
|
||||
2012-11-23 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* elf/Makefile ($(objpfx)ld.so): Change readelf to $(READELF).
|
||||
|
11
configure
vendored
11
configure
vendored
@ -5423,12 +5423,11 @@ if test -n "$sysheaders"; then
|
||||
-isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
|
||||
if test -n "$CXX"; then
|
||||
CXX_SYSINCLUDES=
|
||||
cxxmachine=`$CXX -dumpmachine 2>&5` &&
|
||||
cxxheaders=`$CXX -v -S -x c++ /dev/null -o /dev/null 2>&1 \
|
||||
| sed -n -e '1,/#include/d' -e '/^ \//{p;q;}' | sed 's/ //'`
|
||||
test "x$cxxheaders" != x && test "x$i" != "x$cxxheaders" &&
|
||||
CXX_SYSINCLUDES="$CXX_SYSINCLUDES -isystem $cxxheaders \
|
||||
-isystem $cxxheaders/$cxxmachine -isystem $cxxheaders/backward"
|
||||
for cxxheaders in `$CXX -v -S -x c++ /dev/null -o /dev/null 2>&1 \
|
||||
| sed -n -e '1,/#include/d' -e 's/^ \(\/.*\/[cg]++\)/\1/p'`; do
|
||||
test "x$cxxheaders" != x &&
|
||||
CXX_SYSINCLUDES="$CXX_SYSINCLUDES -isystem $cxxheaders"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
|
11
configure.in
11
configure.in
@ -995,12 +995,11 @@ if test -n "$sysheaders"; then
|
||||
-isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
|
||||
if test -n "$CXX"; then
|
||||
CXX_SYSINCLUDES=
|
||||
cxxmachine=`$CXX -dumpmachine 2>&AS_MESSAGE_LOG_FD` &&
|
||||
cxxheaders=`$CXX -v -S -x c++ /dev/null -o /dev/null 2>&1 \
|
||||
| sed -n -e '1,/#include/d' -e '/^ \//{p;q;}' | sed 's/ //'`
|
||||
test "x$cxxheaders" != x && test "x$i" != "x$cxxheaders" &&
|
||||
CXX_SYSINCLUDES="$CXX_SYSINCLUDES -isystem $cxxheaders \
|
||||
-isystem $cxxheaders/$cxxmachine -isystem $cxxheaders/backward"
|
||||
for cxxheaders in `$CXX -v -S -x c++ /dev/null -o /dev/null 2>&1 \
|
||||
| sed -n -e '1,/#include/d' -e 's/^ \(\/.*\/[cg]++\)/\1/p'`; do
|
||||
test "x$cxxheaders" != x &&
|
||||
CXX_SYSINCLUDES="$CXX_SYSINCLUDES -isystem $cxxheaders"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(SYSINCLUDES)
|
||||
|
Loading…
Reference in New Issue
Block a user