From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by sourceware.org (Postfix) with ESMTPS id D65AB38381DD for ; Fri, 25 Nov 2022 20:46:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D65AB38381DD 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-x334.google.com with SMTP id i64-20020a1c3b43000000b003d016c21100so6996546wma.3 for ; Fri, 25 Nov 2022 12:46:17 -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=XDUMmQJTDKwfCVwOFy3quKHwK2Ypjb+lID3P54rgFM4=; b=hIIvKfN+ouJB/iYTYdscmOW/A5GS7tAbvEz9JPM3Zgv70MNaQFk6BYzz6kh6KGhxMv qYpE3o3SCVd6upgwcMEtjUoc7u6BTj97J4l7n4pkUHaCU6t6rlqR4Uhqm5YAf5a9TrLk +NRjj2VrA9TFEp0bmJisLV4LXlk6rAnUP74D4JyJYRVRfnHKw/fLEUtC3Z3BIINLAOvp ujKOMy/ttnioGn4XVnc4YTPCqQUNKNOZwTqf5T5QCtBCIjZv3xtbs2MnM4XeB/qSTu92 dNI05hAz4w6+zGqWnanoNCf7VfeWOFkD4lVmmtfeM7zd2LQ5BRdgzFEmf9lVMaIVa+rm IrvQ== 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=XDUMmQJTDKwfCVwOFy3quKHwK2Ypjb+lID3P54rgFM4=; b=TAH1QHJd+i8IrpgKUMDTX+NIdGknNVA+I3XyHOVGq5vxGFs6zH97cCkn+rze+rKlng 9Ytw+SudT4elgcIsLgXsNbnT7ROZneY0JTsspJZHyJrhxDjqsJ3QwDf7+NRvFZD+KN+v POHk3xs88++Z0+o9RSuowqyLhlntee1fn8g09YoZU0F24B37Q6KnZxGxkDaGjZc+SoSp RH2fuWYW6JgkJqEiRa+6NDQXPg4zwnPMC51FGOkmdD96LUH3KmZo8aqCqXv8ngKsmlgl Ph6AajNQsO3qWs9zzxdiRZznDz7SU/+6Mcphsl/0yGKu0ccUTlYYY9Xq/dMg9N1+G4BJ N0QQ== X-Gm-Message-State: ANoB5pkW/J/RpumM8IXNsJT7hO+Xu3DQrmHfoo6us+z4XOsF+3pVpvmt s2Q64PbbKeL6SWN0kfEIYJo= X-Google-Smtp-Source: AA0mqf4gEmhClj319qIUYPR39/38f/Y42UJuHzsbL+/JDUR5bV9U7F25aHQAsNA8TFAq7XVuROgbww== X-Received: by 2002:a05:600c:3647:b0:3b4:c00d:2329 with SMTP id y7-20020a05600c364700b003b4c00d2329mr18599682wmq.124.1669409176581; Fri, 25 Nov 2022 12:46:16 -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 n16-20020a05600c501000b003c21ba7d7d6sm6388608wmr.44.2022.11.25.12.46.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Nov 2022 12:46: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: Date: Fri, 25 Nov 2022 20:46:15 +0000 Cc: GCC Development Content-Transfer-Encoding: quoted-printable Message-Id: <1350173E-C2FA-48AB-BC59-BD516FBF15B9@googlemail.com> References: <2840BB68-0E3A-4848-AA39-32E9B822A4F0@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 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. 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. 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. then... - then you can build a cross to aarch64 using that just-build = compiler. - then you can do a native cross (target=3D=3Dhost!=3Dbuild) using = that, which will give you a usable native compiler for arm64 .. (2 is what I was doing all the way through the development - until I = recently got an arm64 machine).. I know that Rosetta 2 bootstrap worked a few days ago =E2=80=A6 BTW: the final step =E2=80=9Cnative cross=E2=80=9D can be a bit tricky = in terms of configure line - since some configure steps cannot (in = general) run the tools on the =E2=80=9Cforeign=E2=80=9D host - so that = you might need to specify the linker version (we don=E2=80=99t have the = option to do =E2=80=94with-ld64=3DNN.MM yet, but there is code that = cares about the version of ld64.. so) >> But in any case, how does that relate to the error messages I got? = They don't seem to have anything to do with missing compilers, but = rather with the use of language features too new for the available = (downloadable) Gnat. >=20 > =46rom https://gcc.gnu.org/install/prerequisites.html: > "In order to build a cross compiler, it is strongly recommended to > install the new compiler as native first, and then use it to build the > cross compiler. Other native compiler versions may work but this is > not guaranteed and *****will typically fail with hard to understand > compilation errors during the build.****" >=20 > I added the emphasis but yes this is all documented correctly. thanks for the reminder! cheers Iain