unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: "Gerd Möllmann" <gerd.moellmann@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, 57380@debbugs.gnu.org
Subject: bug#57380: 29.0.50; configure --config-cache --with-native-compilation failing
Date: Wed, 24 Aug 2022 16:32:20 +0200	[thread overview]
Message-ID: <mvmtu61d85n.fsf@suse.de> (raw)
In-Reply-To: <m2wnaxg3ub.fsf@Mini.fritz.box> ("Gerd Möllmann"'s message of "Wed, 24 Aug 2022 15:37:16 +0200")

On Aug 24 2022, Gerd Möllmann wrote:

> diff --git a/configure.ac b/configure.ac
> index 7616e450d0..08a41a7808 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -4273,6 +4273,7 @@ AC_DEFUN
>        [], [libgccjit_not_found])
>      AC_CHECK_HEADERS([libgccjit.h], [], [libgccjit_dev_not_found])
>      # Check if libgccjit really works.
> +    AC_LANG(C)
>      AC_RUN_IFELSE([libgccjit_smoke_test], [], [libgccjit_broken])
>      HAVE_NATIVE_COMP=yes
>      case "${opsys}" in
>
> This makes it work for me.

That appears to be a misuse of AC_LANG_PUSH/POP.  Apparently they must
not be used inside AC_CACHE_CHECK.

diff --git a/configure.ac b/configure.ac
index 7616e450d0..39bfe7800b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2155,32 +2155,32 @@ AC_SUBST([NS_OBJ])
 AC_SUBST([NS_OBJC_OBJ])
 
 if test "${HAVE_NS}" = yes; then
+  AC_LANG_PUSH([Objective C])
   AC_CACHE_CHECK(
     [if the Objective C compiler supports instancetype],
     [emacs_cv_objc_instancetype],
-    [AC_LANG_PUSH([Objective C])
-     AC_COMPILE_IFELSE(
+    [AC_COMPILE_IFELSE(
        [AC_LANG_SOURCE([[@interface Test
                           + (instancetype)test;
                           @end]])],
        [emacs_cv_objc_instancetype=yes],
-       [emacs_cv_objc_instancetype=no])
-     AC_LANG_POP([Objective C])])
+       [emacs_cv_objc_instancetype=no])])
+  AC_LANG_POP([Objective C])
 
   if test x$emacs_cv_objc_instancetype = xyes ; then
     AC_DEFINE([NATIVE_OBJC_INSTANCETYPE], [1],
               [Define if ObjC compiler supports instancetype natively.])
   fi
 
+  AC_LANG_PUSH([Objective C])
   AC_CACHE_CHECK(
     [if the Objective C compiler defaults to C99],
     [emacs_cv_objc_c99],
-    [AC_LANG_PUSH([Objective C])
-     AC_COMPILE_IFELSE(
+    [AC_COMPILE_IFELSE(
        [AC_LANG_PROGRAM([], [[for (int i = 0;;);]])],
        [emacs_cv_objc_c99=yes],
-       [emacs_cv_objc_c99=no])
-     AC_LANG_POP([Objective C])])
+       [emacs_cv_objc_c99=no])])
+  AC_LANG_POP([Objective C])
 
    if test x$emacs_cv_objc_c99 = xno ; then
      GNU_OBJC_CFLAGS="$GNU_OBJC_CFLAGS -std=c99"

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."





  parent reply	other threads:[~2022-08-24 14:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-24 12:09 bug#57380: 29.0.50; configure --config-cache --with-native-compilation failing Gerd Möllmann
2022-08-24 12:31 ` Eli Zaretskii
2022-08-24 12:55   ` Gerd Möllmann
2022-08-24 13:30     ` Gerd Möllmann
2022-08-24 13:37       ` Gerd Möllmann
2022-08-24 14:23         ` Eli Zaretskii
2022-08-24 14:32         ` Andreas Schwab [this message]
2022-08-24 16:20           ` Gerd Möllmann
2022-08-25  9:16             ` Gerd Möllmann

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mvmtu61d85n.fsf@suse.de \
    --to=schwab@suse.de \
    --cc=57380@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=gerd.moellmann@gmail.com \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).