public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Roger Sayle <sayle@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-1915] Update configure to check for a recent gnat Ada compiler.
Date: Mon,  1 Aug 2022 10:41:58 +0000 (GMT)	[thread overview]
Message-ID: <20220801104158.142C13858D39@sourceware.org> (raw)

https://gcc.gnu.org/g:71f068a9b3332a2179dfc807cf9138f691d77461

commit r13-1915-g71f068a9b3332a2179dfc807cf9138f691d77461
Author: Roger Sayle <roger@nextmovesoftware.com>
Date:   Mon Aug 1 11:36:23 2022 +0100

    Update configure to check for a recent gnat Ada compiler.
    
    GCC fails to bootstrap when configured with --enable-languages=all on
    machines that have older versions of GNAT installed as the system Ada
    compiler.  In configure, it's not sufficient to check whether gnat is
    available, but whether a sufficiently recent version of GNAT is
    installed.  This patch tweaks config/acx.m4 so that conftest.adb also
    contains a reference to System.CRTL.int64 as required by the current
    version of gcc/ada/osint.adb.  This fixes the build when the system
    Ada is GNAT v4.8.5 (on Redhat 7) by disabling ada, but continues to
    work fine when the system Ada is GNAT v11.3.1.
    
    2022-08-01  Roger Sayle  <roger@nextmovesoftware.com>
                Arnaud Charlet  <charlet@adacore.com>
    
    config/ChangeLog
            * acx.m4 (AC_PROG_GNAT): Update conftest.adb to include
            features required of the host gnat compiler.
    
    ChangeLog
            * configure: Regenerate.

Diff:
---
 config/acx.m4 | 6 +++++-
 configure     | 8 ++++++--
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/config/acx.m4 b/config/acx.m4
index b86c4f9e51d..7efe98aaf96 100644
--- a/config/acx.m4
+++ b/config/acx.m4
@@ -393,9 +393,13 @@ AC_DEFUN([ACX_PROG_GNAT],
 AC_REQUIRE([AC_PROG_CC])
 AC_CHECK_TOOL(GNATBIND, gnatbind, no)
 AC_CHECK_TOOL(GNATMAKE, gnatmake, no)
-AC_CACHE_CHECK([whether compiler driver understands Ada],
+AC_CACHE_CHECK([whether compiler driver understands Ada and is recent enough],
 		 acx_cv_cc_gcc_supports_ada,
 [cat >conftest.adb <<EOF
+pragma Warnings (Off);
+with System.CRTL;
+pragma Warnings (On);
+use type System.CRTL.int64;
 procedure conftest is begin null; end conftest;
 EOF
 acx_cv_cc_gcc_supports_ada=no
diff --git a/configure b/configure
index 65d7078dbe7..11539d7f01e 100755
--- a/configure
+++ b/configure
@@ -5602,12 +5602,16 @@ else
   GNATMAKE="$ac_cv_prog_GNATMAKE"
 fi
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler driver understands Ada" >&5
-$as_echo_n "checking whether compiler driver understands Ada... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler driver understands Ada and is recent enough" >&5
+$as_echo_n "checking whether compiler driver understands Ada and is recent enough... " >&6; }
 if ${acx_cv_cc_gcc_supports_ada+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.adb <<EOF
+pragma Warnings (Off);
+with System.CRTL;
+pragma Warnings (On);
+use type System.CRTL.int64;
 procedure conftest is begin null; end conftest;
 EOF
 acx_cv_cc_gcc_supports_ada=no


                 reply	other threads:[~2022-08-01 10:41 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=20220801104158.142C13858D39@sourceware.org \
    --to=sayle@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.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: link
Be 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).