diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2017-06-13 04:30:26 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2017-06-13 04:51:49 -0700 |
commit | 5b55c60163f4c99301c4c8fe2504a195620d828a (patch) | |
tree | 5274486fe39605bbfb05a81bc15df87b50bdba65 | |
parent | b05eca0e1d96aecb25516287913c54bbb93d3d92 (diff) | |
download | glibc-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-x | configure | 5 | ||||
-rw-r--r-- | configure.ac | 5 |
2 files changed, 8 insertions, 2 deletions
@@ -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) |