diff options
author | Flavio Cruz <flaviocruz@gmail.com> | 2022-12-18 19:46:15 -0500 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2022-12-19 01:49:30 +0100 |
commit | 8b8c768e3c701ed1993789bb46acb8a12c7a93df (patch) | |
tree | 3b97ed037df898e99ec59a0e3ac482c9aa53cdb7 /sysdeps/mach/configure | |
parent | 71e408e45dcacf429a94b2807f75aaadd8d37cb9 (diff) | |
download | glibc-8b8c768e3c701ed1993789bb46acb8a12c7a93df.zip glibc-8b8c768e3c701ed1993789bb46acb8a12c7a93df.tar.gz glibc-8b8c768e3c701ed1993789bb46acb8a12c7a93df.tar.bz2 |
Force use of -ffreestanding when checking for gnumach headers
Without this ./configure assumes that we are in a fully hosted
environment, which might not be the case. After this patch, we can rely on
the freestanding header files provided by GCC such as stdint.h.
Message-Id: <Y5+0V9osFc/zXMq0@mars>
Diffstat (limited to 'sysdeps/mach/configure')
-rw-r--r-- | sysdeps/mach/configure | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sysdeps/mach/configure b/sysdeps/mach/configure index 739f102..36f556a 100644 --- a/sysdeps/mach/configure +++ b/sysdeps/mach/configure @@ -133,6 +133,8 @@ if test -n "$sysheaders"; then fi ### Sanity checks for Mach header installation +old_CFLAGS=$CFLAGS +CFLAGS="$CFLAGS -ffreestanding" ac_fn_c_check_header_preproc "$LINENO" "mach/mach_types.h" "ac_cv_header_mach_mach_types_h" @@ -143,6 +145,7 @@ else fi +CFLAGS=$old_CFLAGS ac_fn_c_check_header_preproc "$LINENO" "mach/mach_types.defs" "ac_cv_header_mach_mach_types_defs" if test "x$ac_cv_header_mach_mach_types_defs" = xyes; then : @@ -216,7 +219,9 @@ $as_echo_n "checking for creation_time in task_basic_info... " >&6; } if ${libc_cv_mach_task_creation_time+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + old_CFLAGS=$CFLAGS +CFLAGS="$CFLAGS -ffreestanding" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <mach/task_info.h> int @@ -242,6 +247,7 @@ $as_echo "$libc_cv_mach_task_creation_time" >&6; } if test $libc_cv_mach_task_creation_time = no; then as_fn_error $? "you need Mach headers supporting task_info.creation_time" "$LINENO" 5 fi +CFLAGS=$old_CFLAGS mach_interface_list= for ifc in mach mach4 gnumach \ |