From 5b55c60163f4c99301c4c8fe2504a195620d828a Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Tue, 13 Jun 2017 04:30:26 -0700 Subject: [PATCH] Make copy of from GCC 7 [BZ #21573] 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 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 . * configure: Regenerated. --- configure | 5 ++++- configure.ac | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 422482f..524a8bc 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 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 7f43042..213a436 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 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) -- 2.9.4