https://gcc.gnu.org/g:44ec0091c2e08ad7225854a4784dc8fa44975885
commit r17-5039-g44ec0091c2e08ad7225854a4784dc8fa44975885 Author: Sam James <[email protected]> Date: Tue Jun 9 23:52:27 2026 +0100 libitm: drop unused header checks malloc.h, semaphore.h, sys/time.h are unused. unistd.h is used but without checking the guard, so drop the check. libitm/ChangeLog: PR bootstrap/112422 * config.h.in: Regenerate. * configure: Regenerate. * configure.ac: Don't search for malloc.h, semaphore.h, sys/time.h, or unistd.h. (AC_HEADER_TIME): Delete. Diff: --- libitm/config.h.in | 12 ---- libitm/configure | 156 ++-------------------------------------------------- libitm/configure.ac | 4 +- 3 files changed, 5 insertions(+), 167 deletions(-) diff --git a/libitm/config.h.in b/libitm/config.h.in index 26972c7e43e5..8f84097d7322 100644 --- a/libitm/config.h.in +++ b/libitm/config.h.in @@ -45,9 +45,6 @@ /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H -/* Define to 1 if you have the <malloc.h> header file. */ -#undef HAVE_MALLOC_H - /* Define to 1 if you have the `memalign' function. */ #undef HAVE_MEMALIGN @@ -66,9 +63,6 @@ /* Define to 1 if you have the `posix_memalign' function. */ #undef HAVE_POSIX_MEMALIGN -/* Define to 1 if you have the <semaphore.h> header file. */ -#undef HAVE_SEMAPHORE_H - /* Define to 1 if you have the <stdint.h> header file. */ #undef HAVE_STDINT_H @@ -93,9 +87,6 @@ /* 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/time.h> header file. */ -#undef HAVE_SYS_TIME_H - /* Define to 1 if you have the <sys/types.h> header file. */ #undef HAVE_SYS_TYPES_H @@ -157,9 +148,6 @@ /* Define if you can safely include both <string.h> and <strings.h>. */ #undef STRING_WITH_STRINGS -/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ -#undef TIME_WITH_SYS_TIME - /* Version number of package */ #undef VERSION diff --git a/libitm/configure b/libitm/configure index 95f1d7410b9c..f6df36a3823f 100755 --- a/libitm/configure +++ b/libitm/configure @@ -15985,153 +15985,6 @@ libtool_VERSION=1:0:0 # Check header files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <float.h> - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <string.h> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <stdlib.h> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <ctype.h> -#include <stdlib.h> -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 -$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if ${ac_cv_header_time+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <sys/types.h> -#include <sys/time.h> -#include <time.h> - -int -main () -{ -if ((struct tm *) 0) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_time=yes -else - ac_cv_header_time=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 -$as_echo "$ac_cv_header_time" >&6; } -if test $ac_cv_header_time = yes; then - -$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h - -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether string.h and strings.h may both be included" >&5 $as_echo_n "checking whether string.h and strings.h may both be included... " >&6; } if ${gcc_cv_header_string+:} false; then : @@ -16164,13 +16017,12 @@ $as_echo "#define STRING_WITH_STRINGS 1" >>confdefs.h fi -for ac_header in unistd.h semaphore.h sys/time.h sys/auxv.h malloc.h +for ac_header in sys/auxv.h do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + ac_fn_c_check_header_mongrel "$LINENO" "sys/auxv.h" "ac_cv_header_sys_auxv_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_auxv_h" = xyes; then : cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_SYS_AUXV_H 1 _ACEOF fi diff --git a/libitm/configure.ac b/libitm/configure.ac index 7bc5ba204f97..a9fe2d5df7e4 100644 --- a/libitm/configure.ac +++ b/libitm/configure.ac @@ -165,10 +165,8 @@ libtool_VERSION=1:0:0 AC_SUBST(libtool_VERSION) # Check header files. -AC_HEADER_STDC -AC_HEADER_TIME ACX_HEADER_STRING -AC_CHECK_HEADERS(unistd.h semaphore.h sys/time.h sys/auxv.h malloc.h) +AC_CHECK_HEADERS(sys/auxv.h) GCC_HEADER_STDINT(gstdint.h)
