summary refs log tree commit diff
path: root/sysdeps/mach/configure
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2022-12-19 02:34:55 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2022-12-19 02:34:55 +0100
commit7685630b98ca2a3f5de86eadf130993e6cf998a0 (patch)
tree20afda4e5b41f576de3c419e26b749764daf878d /sysdeps/mach/configure
parent8b8c768e3c701ed1993789bb46acb8a12c7a93df (diff)
downloadglibc-7685630b98ca2a3f5de86eadf130993e6cf998a0.tar.gz
glibc-7685630b98ca2a3f5de86eadf130993e6cf998a0.tar.xz
glibc-7685630b98ca2a3f5de86eadf130993e6cf998a0.zip
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.
Diffstat (limited to 'sysdeps/mach/configure')
-rw-r--r--sysdeps/mach/configure9
1 files changed, 3 insertions, 6 deletions
diff --git a/sysdeps/mach/configure b/sysdeps/mach/configure
index 36f556a663..ba6371cd3f 100644
--- a/sysdeps/mach/configure
+++ b/sysdeps/mach/configure
@@ -127,14 +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
-old_CFLAGS=$CFLAGS
-CFLAGS="$CFLAGS -ffreestanding"
+CPPFLAGS="$CPPFLAGS -ffreestanding"
 
 
 ac_fn_c_check_header_preproc "$LINENO" "mach/mach_types.h" "ac_cv_header_mach_mach_types_h"
@@ -527,6 +526,4 @@ if test $hurd_cv_mig_retcode = yes; then
 
 fi
 
-if test -n "$sysheaders"; then
-  CPPFLAGS=$OLD_CPPFLAGS
-fi
+CPPFLAGS=$OLD_CPPFLAGS