diff options
author | Arsen Arsenović <arsen@aarsen.me> | 2022-09-27 12:20:33 +0200 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2022-10-03 15:43:48 +0100 |
commit | bcb1f4387cbec369a0a52a0acf7a6497353597a8 (patch) | |
tree | 21c3f56b13b2bebb8d9bcb7556b0c13dae576439 /libstdc++-v3/configure.ac | |
parent | f1b51f68f8ac6c63e352dda8599aed01634212de (diff) | |
download | gcc-bcb1f4387cbec369a0a52a0acf7a6497353597a8.zip gcc-bcb1f4387cbec369a0a52a0acf7a6497353597a8.tar.gz gcc-bcb1f4387cbec369a0a52a0acf7a6497353597a8.tar.bz2 |
libstdc++: Filter out unconditional <stdio.h> default include
_AC_INCLUDES_DEFAULT_REQUIREMENTS including <stdio.h> when checking for
stdint.h has prevented proper detection of whether stdint.h is present,
since it'd poison the cache variables with test results failing due to
<stdio.h> failing to include. As a solution, for autoconf versions under
2.70, we filter out that bit of code from ac_includes_default.
This issue was fixed in autoconf-2.70.
This also applies to various other headers, but was noticed when looking
into why HAVE_STDINT_H was misdefined.
libstdc++-v3/ChangeLog:
* configure.ac: Remove any lines that unconditionally include
<stdio.h> from ac_includes_default, when running Autoconf <2.70.
* configure: Regenerate.
Diffstat (limited to 'libstdc++-v3/configure.ac')
-rw-r--r-- | libstdc++-v3/configure.ac | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac index b351622..c05fcdd 100644 --- a/libstdc++-v3/configure.ac +++ b/libstdc++-v3/configure.ac @@ -58,6 +58,15 @@ else GLIBCXX_IS_NATIVE=true fi +# In the case that we're building without headers, we won't have <stdio.h> +# available. In these cases, we have to instruct autotools to never include +# <stdio.h> as a part of default headers. +m4_version_prereq([2.70], [], [ +if test "x$with_headers" = "xno"; then + ac_includes_default=`echo "$ac_includes_default" | sed '/^#include <stdio.h>$/d'` +fi +]) + # Sets up automake. Must come after AC_CANONICAL_SYSTEM. Each of the # following is magically included in AUTOMAKE_OPTIONS in each Makefile.am. # 1.x: minimum required version |