git-mach-headers-freestanding
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Mon, 25 Aug 2025 19:11:05 +0000 (21:11 +0200)
committerAurelien Jarno <aurel32@debian.org>
Mon, 25 Aug 2025 19:11:05 +0000 (21:11 +0200)
commit 8b8c768e3c701ed1993789bb46acb8a12c7a93df
Author: Flavio Cruz <flaviocruz@gmail.com>
Date:   Sun Dec 18 19:46:15 2022 -0500

    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>

commit 7685630b98ca2a3f5de86eadf130993e6cf998a0
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Mon Dec 19 02:34:55 2022 +0100

    mach: Fix passing -ffreestanding when checking for gnumach headers

    8b8c768e3c70 ("Force use of -ffreestanding when checking for gnumach
    headers") was passing -ffreestanding to CFLAGS only, but headers checks are
    performed with the preprocessor, so we rather need to pass it to CPPFLAGS.

commit 0fb10e49ad169374650534509767ec1d4232e230
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Mon Dec 19 02:38:38 2022 +0100

    mach: Drop remnants of old_CFLAGS

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name git-mach-headers-freestanding.diff

sysdeps/mach/configure
sysdeps/mach/configure.ac

index 739f1028a46f46a31ef8d5287a70d6d94ef68926..3f0a90299f54c9cb4ff07a738f3335b68794e70e 100644 (file)
@@ -127,12 +127,13 @@ fi
 config_vars="$config_vars
 MIG = $MIG"
 
+OLD_CPPFLAGS=$CPPFLAGS
 if test -n "$sysheaders"; then
-  OLD_CPPFLAGS=$CPPFLAGS
   CPPFLAGS="$CPPFLAGS $SYSINCLUDES"
 fi
 
 ### Sanity checks for Mach header installation
+CPPFLAGS="$CPPFLAGS -ffreestanding"
 
 
 ac_fn_c_check_header_preproc "$LINENO" "mach/mach_types.h" "ac_cv_header_mach_mach_types_h"
@@ -521,6 +522,4 @@ if test $hurd_cv_mig_retcode = yes; then
 
 fi
 
-if test -n "$sysheaders"; then
-  CPPFLAGS=$OLD_CPPFLAGS
-fi
+CPPFLAGS=$OLD_CPPFLAGS
index 61b00d66b109121937e64fb550b2504d0c224515..a57cb259b3b8987ccdaf9736a3d5652446ef5411 100644 (file)
@@ -6,12 +6,13 @@ if test "x$MIG" = xMISSING; then
 fi
 LIBC_CONFIG_VAR([MIG], [$MIG])
 
+OLD_CPPFLAGS=$CPPFLAGS
 if test -n "$sysheaders"; then
-  OLD_CPPFLAGS=$CPPFLAGS
   CPPFLAGS="$CPPFLAGS $SYSINCLUDES"
 fi
 
 ### Sanity checks for Mach header installation
+CPPFLAGS="$CPPFLAGS -ffreestanding"
 AC_CHECK_HEADER(mach/mach_types.h,,
                 [AC_MSG_ERROR([cannot find Mach headers])], -)
 AC_CHECK_HEADER(mach/mach_types.defs,, [dnl
@@ -130,6 +131,4 @@ fi])
 
 hurd_MIG_RETCODE
 
-if test -n "$sysheaders"; then
-  CPPFLAGS=$OLD_CPPFLAGS
-fi
+CPPFLAGS=$OLD_CPPFLAGS