From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by sourceware.org (Postfix) with ESMTPS id CB851385B53B for ; Sat, 26 Nov 2022 15:58:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CB851385B53B Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=googlemail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=googlemail.com Received: by mail-wm1-x32e.google.com with SMTP id a11-20020a05600c2d4b00b003cf6f5fd9f1so5447664wmg.2 for ; Sat, 26 Nov 2022 07:58:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=bNxCfLH/+SXYOnOTTPqFuZqFV8hBOlcf/QuL78R2BeA=; b=X35EpHNng9qdH6ef4pYGDHu70tLPx0IvkfPLvys2TdAdQo1O4E3Fy7wmqBa7f93328 dNxuBABiP/rCLH8yYLz6904yRKKtavs7TVvQpYz8r36rJ/sz1ZZLtk79CIBIdRdhd6Bc oYzh469NNI4gRKN3caNtYLlvsKN4Z93xLAug2pVsdx/9+57Bt5gKXaiEA88y1dvhCr1g LyzyhsDsQlRjfyROeJVNkVMPyWFeotE9pLC5RcWESUsE0sP8pPNcn+JO5Ih/SkJH6qAN uiu6yQX8Y3ZoNxxJ8RAloWbf+ljIQTdAd0tfqgy5d3ZhGRE/lKVe1iOeFlhxTy32/wiK faUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bNxCfLH/+SXYOnOTTPqFuZqFV8hBOlcf/QuL78R2BeA=; b=kGqzjr6qtPO+ZKtfosAyUG9HFwgkXNz5waKFQpO0K1hVqXs606UohWjiKKBpSILUWc HwCKwdMSELcUDUdn6gCvauM7aI4OADBgMZmzaGNlXZnvWs8QFPxkEE0Sgw2YYpCYQi1v OgpC0pbOoeWwT+EsbmmOmcTqFX88OhTwTukqUTWhjZmwCydQymhxpXGQdHcLSCI/HkJy cv8U2t8Yq4sRsh9sCI7N5U/RXdNd3BGKpoCTdexlcQf980TNaswCBgUWZ4Z4HCX9VLQH XYr/PTaqhMRIXieUaudnt0IytaceP24zncYvndsRNUGRCNEHN/DD5xBrZTE5H9cR0aap +mpA== X-Gm-Message-State: ANoB5plSu8cmN1Zd3ZC2aMXnS/XHIYFvEPKWOw7YX4f++ye4bjdzCNps nhA6C2pcb2V/kYMHaDb5huc= X-Google-Smtp-Source: AA0mqf78quKAeVVDKQHzBj7txSqJGx6oWjUOgEKgJtfsOoQx7WAd+za5J29LcLC1BcgpkismKsVOag== X-Received: by 2002:a05:600c:4891:b0:3cf:d367:2765 with SMTP id j17-20020a05600c489100b003cfd3672765mr36041724wmp.12.1669478297228; Sat, 26 Nov 2022 07:58:17 -0800 (PST) Received: from smtpclient.apple (host81-138-1-83.in-addr.btopenworld.com. [81.138.1.83]) by smtp.googlemail.com with ESMTPSA id i7-20020a05600c354700b003d04e4ed873sm3461420wmq.22.2022.11.26.07.58.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 26 Nov 2022 07:58:16 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: Can't build Ada From: Iain Sandoe In-Reply-To: <338FD630-E757-4595-8282-652A12044393@comcast.net> Date: Sat, 26 Nov 2022 15:58:15 +0000 Cc: GCC Development Content-Transfer-Encoding: quoted-printable Message-Id: <61273BB4-B75C-4026-9A43-337FD6361CF4@googlemail.com> References: <2840BB68-0E3A-4848-AA39-32E9B822A4F0@comcast.net> <1350173E-C2FA-48AB-BC59-BD516FBF15B9@googlemail.com> <338FD630-E757-4595-8282-652A12044393@comcast.net> To: Paul Koning X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_SHORT,RCVD_IN_DNSWL_NONE,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 List-Id: Hi Paul, > On 26 Nov 2022, at 15:48, Paul Koning via Gcc wrote: >> On Nov 25, 2022, at 3:46 PM, Iain Sandoe = wrote: >>=20 >>> On 25 Nov 2022, at 20:13, Andrew Pinski via Gcc = wrote: >>>=20 >>> On Fri, Nov 25, 2022 at 12:08 PM Paul Koning = wrote: >>>>=20 >>>>> On Nov 25, 2022, at 3:03 PM, Andrew Pinski = wrote: >>>>>=20 >>>>> On Fri, Nov 25, 2022 at 11:59 AM Paul Koning via Gcc = wrote: >>>>>>=20 >>>>>> I'm trying to use fairly recent GCC sources (the gcc-darwin = branch to be precise) to build Ada, starting with the latest (2020) = release of Gnat from Adacore. >>>>>=20 >>>>> Are you building a cross compiler or a native compiler? >>>>> If you are building a cross, you need to bootstrap a native = compiler first. >>>>=20 >>>> I'm not sure. The installed Gnat is x86_64-darwin; I want to build = aarch64-darwin. >>>=20 >>> You have to build a x86_64-darwin compiler first with the same = sources >>> as you are building for aarch64-darwin. >>=20 >> So ..=20 >> 1/ if you are on arm64 Darwin,=20 >> - the first step is to bootstrap the compiler using Rosetta 2 and the = available x86_64 gnat. >>=20 >> 2/ if you are on x86_64 Darwin=E2=80=A6 >> - the first step is to bootstrap the compiler using the available = x86-64 gnat. >=20 > Thanks all. >=20 > I tried that (#1) and got the same failure. The trouble seems to be = that the current sources have Ada2020 constructs in them and the = available Gnat doesn't support that version. The commit that introduces = these (or some of them at least) is 91d68769419b from Feb 4, 2022. I am part way through the exercise on both macOS 11 (X86) and 12 = (Arm64). ** However, I am using gcc-7.5 as the bootstrap compiler, not gcc-5.1. You might find problems unless you actually start a Rosetta 2 shell - so=20= =E2=80=9C arch -x86_64 bash =E2=80=9C=20 and then go from there (this seems to ensure that sub-processes are = started as x86_64) (with this, bootstrap succeeded for both x86_64 Rosetta 2 and rebased = Arm64 branch native - r13-4309-g309e2d95e3b9) I will push the rebased arm64 branch when testing is done. > So I'm guessing I'll have to do this in two parts, first build a newer = but not-latest Gnat from a release that doesn't include the problematic = constructs, then follow that by using the intermediate to build the = current sources. >=20 > I wonder if this incompatibility was intentional. If not it would be = good for the Ada maintainers to fix these and ensure that the current = code can still be built with the most recent public release of Gnat. = Conversely, if it is intentional, the documentation should be updated to = explain how to build the current code. The current statement (https://gcc.gnu.org/install/prerequisites.html) = is: GNAT In order to build GNAT, the Ada compiler, you need a working GNAT = compiler (GCC version 5.1 or later). so, if 5.1 is not working, then perhaps a PR is in order. cheers Iain