public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Samuel Thibault <sthibaul@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc] mach: Fix passing -ffreestanding when checking for gnumach headers Date: Mon, 19 Dec 2022 01:36:14 +0000 (GMT) [thread overview] Message-ID: <20221219013614.E80BE38F8798@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7685630b98ca2a3f5de86eadf130993e6cf998a0 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. Diff: --- sysdeps/mach/configure | 9 +++------ sysdeps/mach/configure.ac | 9 +++------ 2 files changed, 6 insertions(+), 12 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 diff --git a/sysdeps/mach/configure.ac b/sysdeps/mach/configure.ac index 5816c3d4ad..900e5445c5 100644 --- a/sysdeps/mach/configure.ac +++ b/sysdeps/mach/configure.ac @@ -6,14 +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 -old_CFLAGS=$CFLAGS -CFLAGS="$CFLAGS -ffreestanding" +CPPFLAGS="$CPPFLAGS -ffreestanding" AC_CHECK_HEADER(mach/mach_types.h,, [AC_MSG_ERROR([cannot find Mach headers])], -) CFLAGS=$old_CFLAGS @@ -136,6 +135,4 @@ fi]) hurd_MIG_RETCODE -if test -n "$sysheaders"; then - CPPFLAGS=$OLD_CPPFLAGS -fi +CPPFLAGS=$OLD_CPPFLAGS
reply other threads:[~2022-12-19 1:36 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20221219013614.E80BE38F8798@sourceware.org \ --to=sthibaul@sourceware.org \ --cc=glibc-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).