https://gcc.gnu.org/g:6242e45f51c3bc6196ba1cdd7697ac63a25b408b
commit r17-5287-g6242e45f51c3bc6196ba1cdd7697ac63a25b408b Author: Sam James <[email protected]> Date: Wed Oct 14 01:27:30 2026 +0100 libgcc: drop unused header checks None of these results are used. libgcc/ChangeLog: PR bootstrap/112422 * config.in: Regenerate. * configure: Regenerate. * configure.ac: Don't search for inttypes.h, stdint.h, sys/auxv.h, sys/mman.h, sys/stat.h, sys/types.h, or unistd.h. Diff: --- libgcc/config.in | 18 ------------------ libgcc/configure | 16 +++++++++++++--- libgcc/configure.ac | 5 ++--- 3 files changed, 15 insertions(+), 24 deletions(-) diff --git a/libgcc/config.in b/libgcc/config.in index 8780b5d47185..f43d9ca66dbf 100644 --- a/libgcc/config.in +++ b/libgcc/config.in @@ -28,15 +28,9 @@ /* Define if the compiler supports init priority. */ #undef HAVE_INIT_PRIORITY -/* Define to 1 if you have the <inttypes.h> header file. */ -#undef HAVE_INTTYPES_H - /* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H -/* Define to 1 if you have the <stdint.h> header file. */ -#undef HAVE_STDINT_H - /* Define to 1 if you have the <stdlib.h> header file. */ #undef HAVE_STDLIB_H @@ -46,21 +40,9 @@ /* Define to 1 if you have the <string.h> header file. */ #undef HAVE_STRING_H -/* Define to 1 if you have the <sys/auxv.h> header file. */ -#undef HAVE_SYS_AUXV_H - /* Define to 1 if you have the <sys/mman.h> header file. */ #undef HAVE_SYS_MMAN_H -/* Define to 1 if you have the <sys/stat.h> header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the <sys/types.h> header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the <unistd.h> header file. */ -#undef HAVE_UNISTD_H - /* Define to 1 if __getauxval is available. */ #undef HAVE___GETAUXVAL diff --git a/libgcc/configure b/libgcc/configure index 781f81f8ed09..a3f6a4a9650b 100755 --- a/libgcc/configure +++ b/libgcc/configure @@ -4469,9 +4469,19 @@ as_fn_arith $ac_cv_sizeof_long_double \* 8 && long_double_type_size=$as_val -for ac_header in inttypes.h stdint.h stdlib.h ftw.h \ - unistd.h sys/stat.h sys/types.h \ - string.h strings.h memory.h sys/auxv.h sys/mman.h +for ac_header in stdlib.h ftw.h string.h strings.h memory.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_preproc "$LINENO" "$ac_header" "$as_ac_Header" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +for ac_header in ftw.h sys/mman.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_preproc "$LINENO" "$ac_header" "$as_ac_Header" diff --git a/libgcc/configure.ac b/libgcc/configure.ac index 246d246ced8d..0a09fd9ce423 100644 --- a/libgcc/configure.ac +++ b/libgcc/configure.ac @@ -230,9 +230,8 @@ AS_VAR_ARITH([long_double_type_size], [$ac_cv_sizeof_long_double \* 8]) AC_SUBST(double_type_size) AC_SUBST(long_double_type_size) -AC_CHECK_HEADERS(inttypes.h stdint.h stdlib.h ftw.h \ - unistd.h sys/stat.h sys/types.h \ - string.h strings.h memory.h sys/auxv.h sys/mman.h) +AC_CHECK_HEADERS(stdlib.h ftw.h string.h strings.h memory.h) +AC_CHECK_HEADERS(ftw.h sys/mman.h) # Check for decimal float support. AC_CACHE_CHECK([whether decimal floating point is supported], [libgcc_cv_dfp],
