Message ID | alpine.LFD.2.21.1909251907520.28360@redsun52.ssa.fujisawa.hgst.com |
---|---|
State | Superseded |
Headers | show |
Series | libada: Installation improvements | expand |
Unfortunately the Make-lang.in part is still needed when using the --disable-libada configure switch so a more elaborate change is needed. > Remove the extraneous `install-gnatlib' invocation from within gcc/ then > as all the gnatlib handling ought to be done in libada/ nowadays. > > gcc/ada/ > * gcc-interface/Make-lang.in (ada.install-common): Remove > `install-gnatlib' invocation.
On Thu, 26 Sep 2019, Arnaud Charlet wrote: > Unfortunately the Make-lang.in part is still needed when using the > --disable-libada configure switch so a more elaborate change is needed. Hmm, I've experimented a bit and AFAICT if `--disable-libada' is given without my proposed change applied, then the gnatlib stuff doesn't get built in the first place let alone installed anyway. Actually the `install-gnatlib' target invocation in `ada.install-common' I have proposed to get removed does go ahead in that case, and then fails, again non-fatally (thanks to the `-' recipe line prefix in action here too): make[4]: Entering directory '.../gcc/ada' You must first build the GNAT library: make gnatlib make[4]: *** [gcc-interface/Makefile:497: ../stamp-gnatlib-rts] Error 1 make[4]: Leaving directory '.../gcc/ada' make[3]: *** [.../gcc/ada/gcc-interface/Make-lang.in:852: install-gnatlib] Error 2 make[2]: [.../gcc/ada/gcc-interface/Make-lang.in:828: ada.install-common] Error 2 (ignored) so all my change effectively does in that case is to remove these messages. I went as far as to compare the installed trees with `--disable-libada' specified and then without and with my patch applied respectively and they were exactly the same. NB no gnattools stuff is built either when `--disable-libada' is in effect, due to this clause in Makefile.def: dependencies = { module=all-gnattools; on=all-target-libada; }; leaving the resulting installation with a bare Ada compiler driver and backend only, e.g. with my native `x86_64-linux-gnu' setup: $(prefix)/bin/gnatbind $(prefix)/libexec/gcc/x86_64-linux-gnu/10.0.0/gnat1 (which is then of course incapable of building a `riscv-linux-gnu' cross-compiler, so that's it as far as Ada support goes). Therefore I maintain my change is correct and safe to apply. OK to go ahead with it then? Or have I missed anything and you meant something else (I find "still needed" a bit vague)? Maciej
> > Unfortunately the Make-lang.in part is still needed when using the > > --disable-libada configure switch so a more elaborate change is needed. > > Hmm, I've experimented a bit and AFAICT if `--disable-libada' is given > without my proposed change applied, then the gnatlib stuff doesn't get > built in the first place let alone installed anyway. With --disable-libada you need to build gnatlib and gnattools explicitly via e.g. make -C gcc gnatlib gnattools (after having done a "make" or "make bootstrap") and then you can use "make install" Arno
Index: gcc/gcc/ada/gcc-interface/Make-lang.in =================================================================== --- gcc.orig/gcc/ada/gcc-interface/Make-lang.in +++ gcc/gcc/ada/gcc-interface/Make-lang.in @@ -840,14 +840,6 @@ doc/gnat-style.pdf: ada/gnat-style.texi $(INSTALL_PROGRAM) gnatdll$(exeext) $(DESTDIR)$(bindir)/gnatdll$(exeext); \ fi -# -# Finally, install the library -# - -if [ -f gnat1$(exeext) ] ; \ - then \ - $(MAKE) $(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) install-gnatlib; \ - fi - install-gnatlib: $(MAKE) -C ada $(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) install-gnatlib$(LIBGNAT_TARGET)