summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-06-13 04:30:26 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-06-13 04:51:49 -0700
commit5b55c60163f4c99301c4c8fe2504a195620d828a (patch)
tree5274486fe39605bbfb05a81bc15df87b50bdba65
parentb05eca0e1d96aecb25516287913c54bbb93d3d92 (diff)
downloadglibc-hjl/pr21573.tar.gz
Make copy of <bits/std_abs.h> from GCC 7 [BZ #21573]hjl/pr21573
<bits/std_abs.h> from GCC 7 will include /usr/include/stdlib.h from "#include_next" (instead of stdlib/stdlib.h in the glibc source directory), and this turns up as a make dependency. Also make a copy of <bits/std_abs.h> to prevent it from including /usr/include/stdlib.h. [BZ #21573] * configure.ac (find_cxx_header): Use "\,$1," with sed. (CXX_CSTDLIB_HEADER): Also make a copy of <bits/std_abs.h>. * configure: Regenerated.
-rwxr-xr-xconfigure5
-rw-r--r--configure.ac5
2 files changed, 8 insertions, 2 deletions
diff --git a/configure b/configure
index 422482f355..524a8bcf1c 100755
--- a/configure
+++ b/configure
@@ -5336,9 +5336,12 @@ fi
# copy of those headers in Makerules.
if test -n "$CXX"; then
find_cxx_header () {
- echo "#include <$1>" | $CXX -M -MP -x c++ - | sed -n "/$1:/{s/:\$//;p}"
+ echo "#include <$1>" | $CXX -M -MP -x c++ - | sed -n "\,$1:,{s/:\$//;p}"
}
CXX_CSTDLIB_HEADER="$(find_cxx_header cstdlib)"
+ # Also make a copy of <bits/std_abs.h> from GCC 7 to prevent it from
+ # including /usr/include/stdlib.h.
+ CXX_CSTDLIB_HEADER="$CXX_CSTDLIB_HEADER $(find_cxx_header bits/std_abs.h)"
CXX_CMATH_HEADER="$(find_cxx_header cmath)"
fi
diff --git a/configure.ac b/configure.ac
index 7f430425ae..213a436695 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1187,9 +1187,12 @@ AC_SUBST(CXX_SYSINCLUDES)
# copy of those headers in Makerules.
if test -n "$CXX"; then
find_cxx_header () {
- echo "#include <$1>" | $CXX -M -MP -x c++ - | sed -n "/$1:/{s/:\$//;p}"
+ echo "#include <$1>" | $CXX -M -MP -x c++ - | sed -n "\,$1:,{s/:\$//;p}"
}
CXX_CSTDLIB_HEADER="$(find_cxx_header cstdlib)"
+ # Also make a copy of <bits/std_abs.h> from GCC 7 to prevent it from
+ # including /usr/include/stdlib.h.
+ CXX_CSTDLIB_HEADER="$CXX_CSTDLIB_HEADER $(find_cxx_header bits/std_abs.h)"
CXX_CMATH_HEADER="$(find_cxx_header cmath)"
fi
AC_SUBST(CXX_CSTDLIB_HEADER)