> > 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).

Sorry about that, I didn't anticipate this case (and this change is definitely
a tricky one, although it's going in the right direction in terms of
bootstraping constraints).

> 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.

Can you try the following patch and confirm this works on Fedora:

--
--- gcc/ada/gcc-interface/Make-lang.in
+++ gcc/ada/gcc-interface/Make-lang.in
@@ -87,7 +87,8 @@ endif

 ifeq ($(STAGE1),True)
   ADA_INCLUDES=$(COMMON_ADA_INCLUDES)
-  GNATLIB=$(dir $(shell $(CC) -print-libgcc-file-name))adalib/libgnat.a 
$(STAGE1_LIBS)
+  adalib=$(dir $(shell $(CC) -print-libgcc-file-name))adalib
+  GNATLIB=$(adalib)/$(if $(wildcard $(adalib)/libgnat.a),libgnat.a,libgnat.so) 
$(STAGE1_LIBS)
 else
   ADA_INCLUDES=-nostdinc $(COMMON_ADA_INCLUDES) -Iada/libgnat 
-I$(srcdir)/ada/libgnat -Iada/gcc-interface -I$(srcdir)/ada/gcc-interface
 endif

Reply via email to