On Tue, Jun 15, 2021 at 06:20:52AM -0400, Pierre-Marie de Rodat wrote: > When performing a bootstrap with Ada, we are currently using the runtime > files from the repository during stage1, causing some subtle > inconsistencies during stage1 of the bootstrap, sometimes hard to > workaround. This change now uses the runtime from the base compiler > during stage1 only. We still rely on a few more recent runtime services, > so we have to copy some files from libgnat to <object dir>/gcc/ada in > the process. > > Tested on x86_64-pc-linux-gnu, committed on trunk > > gcc/ada/ > > * Make-generated.in: Add rule to copy runtime files needed > during stage1. > * raise.c: Remove obsolete symbols used during bootstrap. > * gcc-interface/Make-lang.in: Do not use libgnat sources during > stage1. > (GNAT_ADA_OBJS, GNATBIND_OBJS): Split in two parts, the common > part and the part only used outside of stage1. > (ADA_GENERATED_FILES): Add runtime files needed during bootstrap > when recent APIs are needed. > (ada/b_gnatb.adb): Remove prerequisite. > * gcc-interface/system.ads: Remove obsolete entries.
This breaks bootstrap on Fedora, where usually only libgnat.so* and not libgnat.a is installed (one needs to install libgnat-static for it to be present). Shouldn't it instead just add -L $(dir $(shell $(CC) -print-libgcc-file-name))adalib/ -lgnat instead of forcing to always link against libgnat.a? Or at least test whether libgnat.a is present and otherwise use the above. Jakub