ada.eclass currently does not have support for GNAT-FSF. I propose adding a new Ada Target, "gnat_2022", that pulls in sys-devel/gcc:12 [ada] to provide Ada 2022 support, since GNAT-GPL will not be receiving further updates. Reproducible: Always Steps to Reproduce: N/A Actual Results: N/A A patch for ada.eclass will be attached shortly. This works with existing Ada packages without any modifications, and allows compatible apps to support ADA_TARGET="gnat_2022" to use GNAT FSF. With this setup, GPRBuild works out of the box - I did not check any other apps, but I have no reason to suspect that they wouldn't work.
Created attachment 800201 [details, diff] Patch to be applied to the current ada.eclass for gnat_2022 support Added patch. The patch will only be functional once gcc [ada] is unmasked, however if that is done than it can be used even now.
After some additional thought, I'd like to note a few issues with Gentoo's current Ada support: 1. GNAT does not have a stable ABI between major GCC versions. This could be addressed by forcing a rebuild of all Ada packages when the GCC slot is changed. 2. Related to the above, defining an annual gnat_ version doesn't make much sense. Instead, we could use ADA_COMPAT to refer to the minimum Ada language specification required. Then something like: dev-ada/gprbuild - ADA_TARGET="gnat_95" will automatically select a GCC version with full support for that Ada feature level. Hypothetically, app-arch/unkompress - ADA_TARGET="gnat_2022" should pull the latest available GCC or fail, since Ada 2022 is not yet ratified. GCC 12 has ~90% support for it, but even still that would be unacceptable for a stable package, so all packages requiring gnat_2022 would be put in ~arch. We could define "gnat_2020" and "gnat_2021" as equivalent to "gnat_2012" for the sake of compatibility, and make.conf could be used to select the Ada implementations you are willing to use, just as now.
why not adding something like gcc_12_1_1 together with gnat_2020 and gnat_2021. I do not mean to add gcc_x_y_z for any gcc version, but only for those that we choose as possible target, and for which the ada packages in the portage tree are tested.
or maybe fsf_2022_r1. Annual releases will not work anymore, I agree
sys-devel/gcc-12.2.0* is used now by set ADA_TARGET="gcc_12_2_0"