Message ID | 004601d8a460$940e7220$bc2b5660$@nextmovesoftware.com |
---|---|
State | New, archived |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6a10:b5d6:b0:2b9:3548:2db5 with SMTP id v22csp1506830pxt; Sat, 30 Jul 2022 15:06:43 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sUF1iZMTquT+lW5q+ddY7DeZwkc1TwR0VOW5Viskfo6Ig47JHO/8nNR5Zo4Tqk5iFWRVlU X-Received: by 2002:a17:907:60cc:b0:72b:40a8:a5b with SMTP id hv12-20020a17090760cc00b0072b40a80a5bmr7233833ejc.379.1659218803524; Sat, 30 Jul 2022 15:06:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659218803; cv=none; d=google.com; s=arc-20160816; b=GZljmgQ8DpyNMwWnTO7613tGZ4OPSqaRgMC2NL3sp2YMLAe+vJV2zo6lzsuUhK3n7U SgDLiEIBD0Q6DqVqJV33fdOpDfJBZfDUsTORx27bkqBQ98EUUhzjZoJCsPTN/qDJl+ux WotwjLGVzmS1KVtPTJ/OZJhUR6rVWVsr8b3YdYL2C/JVl18eOW9P0hqw+d48+F63mid2 ryzFlmhdPV7mMmVZQiOTgyOk4H3lpWkYeI7xjl1IWvmgKZXl8ZyOGjaoAm0wLGLWDwPQ PEG2dFnDM6UGl5exw1txMn3IIhpr244ezS4YVB2EYqAHEkgCoP4C2m3H0V8tZREzeJqZ O7FA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-language:thread-index :mime-version:message-id:date:subject:to:from:dkim-signature :dmarc-filter:delivered-to; bh=waP/B5KXdj36/1+HTmUJHVtNR26dzAqgXRkUAbjwhl0=; b=BwXQQvfunjdh0ouZCU95RsBP2HcuIAV5vFcZ9yvSsgz7RfN2UihIOZisMernp1dAU4 E+AE/v9lPAmt4L7bXZUV98T9NL7zl+pl7L7q+8RrOD3RCoecqXWizysNJZyfO7g2RdZk eYPRkIcgT9Ox1g/3FF4qokpsz3dRmquarhBcmuEQr18TN6gkXD7MsxvOHew6ya1uHA95 eCpRoLd7Q8+MVxcKyKuCx8QwFINno5YkTLhbtUaLZUEXj1PB2ZBM6oPJshinydW+Wwc1 DoVoRftnHK/GwIn5Fjwk3+Yx0UUgOweTGaufEgKhXONxco0MVgIEmbeK71Atkm6OUvnd 6w9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nextmovesoftware.com header.s=default header.b=PgKs5gAb; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id hq41-20020a1709073f2900b0072f2b362fc5si6374595ejc.800.2022.07.30.15.06.43 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Jul 2022 15:06:43 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=fail header.i=@nextmovesoftware.com header.s=default header.b=PgKs5gAb; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0514F385357D for <ouuuleilei@gmail.com>; Sat, 30 Jul 2022 22:06:36 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from server.nextmovesoftware.com (server.nextmovesoftware.com [162.254.253.69]) by sourceware.org (Postfix) with ESMTPS id 216063858418 for <gcc-patches@gcc.gnu.org>; Sat, 30 Jul 2022 22:06:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 216063858418 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=nextmovesoftware.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=nextmovesoftware.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nextmovesoftware.com; s=default; h=Content-Type:MIME-Version:Message-ID: Date:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=waP/B5KXdj36/1+HTmUJHVtNR26dzAqgXRkUAbjwhl0=; b=PgKs5gAbsl6Ei+zTP55JRwW4tx ln5ARFyQk/ixVNaRHC8qf9IJiJQUCEznpijMV420hM57FvKNWwA+cozXvVfIwiGUXpZVwjqzXJkzs FhZwzDwkUW4dP0Ex5zZmE9fBNbSKufH1JhOrfSvAbB25VKHo08Zp0wx30BNZU6fOHqQ4euUuqL53c aTuE3fwYBdSHYppyt+QjaQHSpOYQAdgUCDU5tkWDL6JbcHUPwYTSpPS/6tzaZtTLV9fOixP47WgBf 6ol/iVcnvXHDOvHaopFzE8/fmm/+5lVUX+ALwP//Itaox0kb+NNbfWXKKGjDo3/sNIFASF8l9tZA4 CWcR78yA==; Received: from host86-169-41-119.range86-169.btcentralplus.com ([86.169.41.119]:60608 helo=Dell) by server.nextmovesoftware.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <roger@nextmovesoftware.com>) id 1oHub5-0000G0-BJ; Sat, 30 Jul 2022 18:06:11 -0400 From: "Roger Sayle" <roger@nextmovesoftware.com> To: "'GCC Patches'" <gcc-patches@gcc.gnu.org> Subject: [Ada PATCH] Update configure to check for a recent gnat Ada compiler. Date: Sat, 30 Jul 2022 23:06:09 +0100 Message-ID: <004601d8a460$940e7220$bc2b5660$@nextmovesoftware.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0047_01D8A468.F5D2DA20" X-Mailer: Microsoft Outlook 16.0 Thread-Index: AdikX+5HV24GlmLnTN2W7ec+8MkeXQ== Content-Language: en-gb X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server.nextmovesoftware.com X-AntiAbuse: Original Domain - gcc.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - nextmovesoftware.com X-Get-Message-Sender-Via: server.nextmovesoftware.com: authenticated_id: roger@nextmovesoftware.com X-Authenticated-Sender: server.nextmovesoftware.com: roger@nextmovesoftware.com X-Source: X-Source-Args: X-Source-Dir: X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Cc: 'Eric Botcazou' <botcazou@adacore.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1739817016107972861?= X-GMAIL-MSGID: =?utf-8?q?1739817016107972861?= |
Series |
[Ada] Update configure to check for a recent gnat Ada compiler.
|
|
Commit Message
Roger Sayle
July 30, 2022, 10:06 p.m. UTC
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. Tested in x86_64-pc-linux-gnu. Ok for mainline? 2022-07-30 Roger Sayle <roger@nextmovesoftware.com> ChangeLog * config/acx.me (AC_PROG_GNAT): Update conftest.adb to include features required of the host gnat compiler. * configure: Regenerate. Thanks in advance, Roger --
Comments
> 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. > > Tested in x86_64-pc-linux-gnu. Ok for mainline? > > > 2022-07-30 Roger Sayle <roger@nextmovesoftware.com> > > ChangeLog > * config/acx.me (AC_PROG_GNAT): Update conftest.adb to include > features required of the host gnat compiler. > * configure: Regenerate. > > Thanks in advance, > Roger > -- > > diff --git a/config/acx.m4 b/config/acx.m4 > index b86c4f9..bd3e7f8 100644 > --- a/config/acx.m4 > +++ b/config/acx.m4 > @@ -396,6 +396,10 @@ AC_CHECK_TOOL(GNATMAKE, gnatmake, no) > AC_CACHE_CHECK([whether compiler driver understands Ada], I'd suggest changing the text above to e.g. "whether compiler driver understands Ada and is recent enough" OK with this change, thanks! > 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 65d7078..3ddcc9f 100755 > --- a/configure > +++ b/configure > @@ -5608,6 +5608,10 @@ 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
diff --git a/config/acx.m4 b/config/acx.m4 index b86c4f9..bd3e7f8 100644 --- a/config/acx.m4 +++ b/config/acx.m4 @@ -396,6 +396,10 @@ AC_CHECK_TOOL(GNATMAKE, gnatmake, no) AC_CACHE_CHECK([whether compiler driver understands Ada], 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 65d7078..3ddcc9f 100755 --- a/configure +++ b/configure @@ -5608,6 +5608,10 @@ 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