> On 26 Nov 2022, at 18:06, Paul Koning <paulkon...@comcast.net> wrote:
> 
> 
> 
>> On Nov 26, 2022, at 11:42 AM, Arnaud Charlet via Gcc <gcc@gcc.gnu.org> wrote:
>> 
>> 
>>>> 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.
>>> 
>>> I will do that, if the "shell in Rosetta" thing doesn't cure the problem.
>> 
>> You won’t need to, the version of gnat you are using is recent enough, you 
>> need to follow Ian’s instructions to the letter. The Ada 2022 code is a red 
>> herring and is only problematic when you build a cross with a non matching 
>> native, not when building a native compiler.
>> 
>> Arno
> 
> All I can tell you is that I'm pretty sure I'm doing what Iain said, using 
> his branch (up to date), and using the compilers from the Adacore open source 
> release (20200818) which is GCC 8.4.1.  And once again I got that same 
> complaint about Ada2020 constructs:
> 
> /usr/local/gnat/bin/gcc -c -g -O2      -gnatpg -gnata -W -Wall -nostdinc -I- 
> -I. -Iada/generated -Iada -I../../../gcc-darwin/gcc/ada -Iada/libgnat 
> -I../../../gcc-darwin/gcc/ada/libgnat -Iada/gcc-interface 
> -I../../../gcc-darwin/gcc/ada/gcc-interface 
> ../../../gcc-darwin/gcc/ada/contracts.adb -o ada/contracts.o
> s-imagei.ads:95:11: declare_expression is an Ada 2020 feature
> s-valueu.ads:152:09: declare_expression is an Ada 2020 feature
> s-valueu.ads:160:09: declare_expression is an Ada 2020 feature
> s-valueu.ads:184:06: "Subprogram_Variant" is not a valid aspect identifier
> s-valuei.ads:80:11: declare_expression is an Ada 2020 feature
> s-valuei.ads:95:08: declare_expression is an Ada 2020 feature
> s-valuei.ads:141:06: "Subprogram_Variant" is not a valid aspect identifier
> s-widthu.ads:84:09: declare_expression is an Ada 2020 feature
> s-widthu.ads:93:11: run-time library configuration error
> s-widthu.ads:93:11: file s-imgint.ads had parser errors
> s-widthu.ads:93:11: entity "System.Img_Int.Image_Integer" not available
> compilation abandoned
> make[2]: *** [ada/contracts.o] Error 1

1/
For the cross - you have to make sure that the newly-built “native" (Rosetta) 
compiler is found in the path first - perhaps somehow the original bootstrap 
compiler is being found (unless you installed into /usr/local .. which I tend 
to avoid)?

2/ To work around the Xcode “gotcha” of claiming gcc and g++ I find it is 
safest to be specific about CC and CXX on the command line (so 
CC=x86_64-apple-darwinNN-gcc, CXX=x86_64-apple-darwinNN-++ … )

otherwise, I can share my configure lines .. but probably best off-list.
Iain

Reply via email to