* [PATCH 0/2] libada: Installation improvements @ 2019-09-25 21:23 Maciej W. Rozycki 2019-09-25 21:23 ` [PATCH 1/2] libada: Remove racy duplicate gnatlib installation Maciej W. Rozycki 2019-09-25 21:23 ` [PATCH 2/2] libada: Respect `--enable-version-specific-runtime-libs' Maciej W. Rozycki 0 siblings, 2 replies; 23+ messages in thread From: Maciej W. Rozycki @ 2019-09-25 21:23 UTC (permalink / raw) To: gcc-patches Hi, Here's a mini patch series that addresses a couple of long-standing installation issues observed with libada. These have been verified by bootstrapping GCC with an `x86_64-linux-gnu' native configuration and using that compiler to build a `riscv-linux-gnu' cross-compiler, in both cases with and without the `--disable-version-specific-runtime-libs' configuration option used. Also the resulting installed directory tree was examined for correct structure, and in particular unchanged in the absence of the option. OK to apply? Maciej ^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 1/2] libada: Remove racy duplicate gnatlib installation 2019-09-25 21:23 [PATCH 0/2] libada: Installation improvements Maciej W. Rozycki @ 2019-09-25 21:23 ` Maciej W. Rozycki 2019-09-26 7:43 ` Arnaud Charlet 2019-09-25 21:23 ` [PATCH 2/2] libada: Respect `--enable-version-specific-runtime-libs' Maciej W. Rozycki 1 sibling, 1 reply; 23+ messages in thread From: Maciej W. Rozycki @ 2019-09-25 21:23 UTC (permalink / raw) To: gcc-patches For some reason, presumably historical, the `install-gnatlib' target for the default multilib is invoked twice, once via the `ada.install-common' target in `gcc/ada/gcc-interface/Make-lang.in' invoked from gcc/ and again via the `install-libada' target in libada/. Apart from doing the same twice this is actually harmful in sufficiently parallelized `make' invocation, as the removal of old files performed within the `install-gnatlib' recipe in the former case actually races with the installation of new files done in the latter case, causing the recipe to fail and abort, however non-fatally, having not completed the installation of all the built files needed for the newly-built compiler to work correctly. This can be observed with a native `x86_64-linux-gnu' bootstrap: make[4]: Entering directory '.../gcc/ada' rm -rf .../lib/gcc/x86_64-linux-gnu/10.0.0/adalib rm: cannot remove '.../lib/gcc/x86_64-linux-gnu/10.0.0/adalib': Directory not empty make[4]: *** [gcc-interface/Makefile:512: install-gnatlib] Error 1 make[4]: Leaving directory '.../gcc/ada' make[3]: *** [.../gcc/ada/gcc-interface/Make-lang.in:853: install-gnatlib] Error 2 make[2]: [.../gcc/ada/gcc-interface/Make-lang.in:829: ada.install-common] Error 2 (ignored) which then causes missing files to be reported when an attempt is made to use the newly-installed non-functional compiler to build a `riscv-linux-gnu' cross-compiler: (cd ada/bldtools/sinfo; gnatmake -q xsinfo ; ./xsinfo sinfo.h ) error: "ada.ali" not found, "ada.ads" must be compiled error: "s-memory.ali" not found, "s-memory.adb" must be compiled gnatmake: *** bind failed. /bin/sh: ./xsinfo: No such file or directory make[2]: *** [.../gcc/ada/Make-generated.in:45: ada/sinfo.h] Error 127 make[2]: Leaving directory '.../gcc' make[1]: *** [Makefile:4369: all-gcc] Error 2 make[1]: Leaving directory '...' make: *** [Makefile:965: all] Error 2 Depending on timing `.../lib/gcc/x86_64-linux-gnu/10.0.0/adainclude' may cause an installation failure instead and the resulting compiler may be non-functional in a different way. 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. --- gcc/ada/gcc-interface/Make-lang.in | 8 -------- 1 file changed, 8 deletions(-) gcc-lang-no-install-gnatlib.diff 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) ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 1/2] libada: Remove racy duplicate gnatlib installation 2019-09-25 21:23 ` [PATCH 1/2] libada: Remove racy duplicate gnatlib installation Maciej W. Rozycki @ 2019-09-26 7:43 ` Arnaud Charlet 2019-09-27 0:37 ` Maciej W. Rozycki 0 siblings, 1 reply; 23+ messages in thread From: Arnaud Charlet @ 2019-09-26 7:43 UTC (permalink / raw) To: Maciej W. Rozycki; +Cc: gcc-patches, Arnaud Charlet 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. ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 1/2] libada: Remove racy duplicate gnatlib installation 2019-09-26 7:43 ` Arnaud Charlet @ 2019-09-27 0:37 ` Maciej W. Rozycki 2019-09-27 7:15 ` Arnaud Charlet 0 siblings, 1 reply; 23+ messages in thread From: Maciej W. Rozycki @ 2019-09-27 0:37 UTC (permalink / raw) To: Arnaud Charlet; +Cc: gcc-patches 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 ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 1/2] libada: Remove racy duplicate gnatlib installation 2019-09-27 0:37 ` Maciej W. Rozycki @ 2019-09-27 7:15 ` Arnaud Charlet 2019-09-28 16:46 ` [PATCH v2 " Maciej W. Rozycki 0 siblings, 1 reply; 23+ messages in thread From: Arnaud Charlet @ 2019-09-27 7:15 UTC (permalink / raw) To: Maciej W. Rozycki; +Cc: gcc-patches, Arnaud Charlet > > 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 ^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH v2 1/2] libada: Remove racy duplicate gnatlib installation 2019-09-27 7:15 ` Arnaud Charlet @ 2019-09-28 16:46 ` Maciej W. Rozycki 2019-09-29 22:29 ` Maciej W. Rozycki 2019-10-01 8:24 ` Arnaud Charlet 0 siblings, 2 replies; 23+ messages in thread From: Maciej W. Rozycki @ 2019-09-28 16:46 UTC (permalink / raw) To: Arnaud Charlet; +Cc: gcc-patches For some reason, presumably historical, the `install-gnatlib' target for the default multilib is invoked twice, once via the `ada.install-common' target in `gcc/ada/gcc-interface/Make-lang.in' invoked from gcc/ and again via the `install-libada' target in libada/. Apart from doing the same twice this is actually harmful in sufficiently parallelized `make' invocation, as the removal of old files performed within the `install-gnatlib' recipe in the former case actually races with the installation of new files done in the latter case, causing the recipe to fail and abort, however non-fatally, having not completed the installation of all the built files needed for the newly-built compiler to work correctly. This can be observed with a native `x86_64-linux-gnu' bootstrap: make[4]: Entering directory '.../gcc/ada' rm -rf .../lib/gcc/x86_64-linux-gnu/10.0.0/adalib rm: cannot remove '.../lib/gcc/x86_64-linux-gnu/10.0.0/adalib': Directory not empty make[4]: *** [gcc-interface/Makefile:512: install-gnatlib] Error 1 make[4]: Leaving directory '.../gcc/ada' make[3]: *** [.../gcc/ada/gcc-interface/Make-lang.in:853: install-gnatlib] Error 2 make[2]: [.../gcc/ada/gcc-interface/Make-lang.in:829: ada.install-common] Error 2 (ignored) which then causes missing files to be reported when an attempt is made to use the newly-installed non-functional compiler to build a `riscv64-linux-gnu' cross-compiler: (cd ada/bldtools/sinfo; gnatmake -q xsinfo ; ./xsinfo sinfo.h ) error: "ada.ali" not found, "ada.ads" must be compiled error: "s-memory.ali" not found, "s-memory.adb" must be compiled gnatmake: *** bind failed. /bin/sh: ./xsinfo: No such file or directory make[2]: *** [.../gcc/ada/Make-generated.in:45: ada/sinfo.h] Error 127 make[2]: Leaving directory '.../gcc' make[1]: *** [Makefile:4369: all-gcc] Error 2 make[1]: Leaving directory '...' make: *** [Makefile:965: all] Error 2 Depending on timing `.../lib/gcc/x86_64-linux-gnu/10.0.0/adainclude' may cause an installation failure instead and the resulting compiler may be non-functional in a different way. Only invoke `install-gnatlib' from within gcc/ then if a legacy build process is being used with libada disabled and gnatlib built manually with `make -C gcc gnatlib'. gcc/ * Makefile.in (gnat_install_lib): New variable. * configure.ac: Substitute it. * configure: Regenerate. gcc/ada/ * gcc-interface/Make-lang.in (ada.install-common): Split into... (gnat-install-tools, gnat-install-lib): ... these. --- On Fri, 27 Sep 2019, Arnaud Charlet wrote: > > 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" Ack. This seems to be of a very limited use, e.g. it does not support building shared libraries or multilibs, and it breaks in my build of a `riscv64-linux-gnu' cross-compiler because the `make -C gcc' invocation does not pass the `--sysroot=' option set in SYSROOT_CFLAGS_FOR_TARGET and consequently the newly-built compiler cannot find system headers needed to build gnatlib (also there is a missing ordering dependency beetween the `gnatlib' and `gnattools' targets, making the simultaneous invocation as given break in parallel `make', with a `You must first build the GNAT library: make gnatlib' message). I see no particular reason to break what has been working however, so here's my proposed rewritten change. With so many limitations and its mismatch with the current GCC build arrangement and practices I'd consider your manual build recipe a legacy one though and would rather not invest too much effort into supporting it. Insted I'd recommend everyone to switch to building via gnattools/ and libada/ top-level directories. NB one can alternatively use `make -C gcc install-gnatlib' to complement the manual build process. I have verified this change by running my combined build process where a native `x86_64-linux-gnu' configuration is built first and then used to build a `riscv64-linux-gnu' cross-compiler, both with `--disable-libada' specified, without and with this patch applied. I have added `make -C gcc gnatlib && make -C gcc gnattools' as an extra build step before `make install'. This has run up to failing to find `riscv64-linux-gnu' system headers in `make -C gcc gnatlib' as noted above, at which point the installation trees had both the same contents, including `x86_64-linux-gnu' gnatlib development files and static libraries as well as gnattools in particular. I have also verified, with the same build process and the extra `make -C gcc' invocations removed, that the usual configuration with libada enabled produces the same result as with v1 of this change. Maciej Changes from v1: - gnatlib installation now retained in gcc/ada/gcc-interface/Make-lang.in and instead invoked iff `--disable-libada' has been requested at the top level. --- gcc/Makefile.in | 4 ++++ gcc/ada/gcc-interface/Make-lang.in | 5 ++++- gcc/configure | 15 +++++++++++++-- gcc/configure.ac | 10 ++++++++++ 4 files changed, 31 insertions(+), 3 deletions(-) gcc-lang-no-install-gnatlib.diff Index: gcc/gcc/Makefile.in =================================================================== --- gcc.orig/gcc/Makefile.in +++ gcc/gcc/Makefile.in @@ -1705,6 +1705,10 @@ $(FULL_DRIVER_NAME): ./xgcc # language hooks, generated by configure @language_hooks@ +# Wire in install-gnatlib invocation with `make install' for a configuration +# with top-level libada disabled. +gnat_install_lib = @gnat_install_lib@ + # per-language makefile fragments ifneq ($(LANG_MAKEFRAGS),) include $(LANG_MAKEFRAGS) 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 @@ -822,7 +822,9 @@ doc/gnat-style.pdf: ada/gnat-style.texi # gnatlink, gnatls, gnatmake, gnatname, gnatprep, gnatxref, gnatfind, # gnatclean). # gnatdll is only used on Windows. -ada.install-common: +ada.install-common: $(gnat_install_lib) gnat-install-tools + +gnat-install-tools: $(MKDIR) $(DESTDIR)$(bindir) -if [ -f gnat1$(exeext) ] ; \ then \ @@ -843,6 +845,7 @@ doc/gnat-style.pdf: ada/gnat-style.texi # # Finally, install the library # +gnat-install-lib: gnat-install-tools -if [ -f gnat1$(exeext) ] ; \ then \ $(MAKE) $(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) install-gnatlib; \ Index: gcc/gcc/configure =================================================================== --- gcc.orig/gcc/configure +++ gcc/gcc/configure @@ -814,6 +814,7 @@ SET_MAKE accel_dir_suffix real_target_noncanonical enable_as_accelerator +gnat_install_lib REPORT_BUGS_TEXI REPORT_BUGS_TO PKGVERSION @@ -7826,6 +7827,16 @@ else fi +# If top-level libada has been disabled, then wire in install-gnatlib +# invocation with `make install', so that one can build and install +# the library manually with `make -C gcc all gnatlib gnattools install'. +if test x"$enable_libada" = xno; then + gnat_install_lib=gnat-install-lib +else + gnat_install_lib= +fi + + if test x"$enable_as_accelerator_for" != x; then $as_echo "#define ACCEL_COMPILER 1" >>confdefs.h @@ -18819,7 +18830,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18822 "configure" +#line 18833 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -18925,7 +18936,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18928 "configure" +#line 18939 "configure" #include "confdefs.h" #if HAVE_DLFCN_H Index: gcc/gcc/configure.ac =================================================================== --- gcc.orig/gcc/configure.ac +++ gcc/gcc/configure.ac @@ -982,6 +982,16 @@ AC_ARG_ENABLE(languages, esac], [enable_languages=c]) +# If top-level libada has been disabled, then wire in install-gnatlib +# invocation with `make install', so that one can build and install +# the library manually with `make -C gcc all gnatlib gnattools install'. +if test x"$enable_libada" = xno; then + gnat_install_lib=gnat-install-lib +else + gnat_install_lib= +fi +AC_SUBST(gnat_install_lib) + if test x"$enable_as_accelerator_for" != x; then AC_DEFINE(ACCEL_COMPILER, 1, [Define if this compiler should be built as the offload target compiler.]) ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v2 1/2] libada: Remove racy duplicate gnatlib installation 2019-09-28 16:46 ` [PATCH v2 " Maciej W. Rozycki @ 2019-09-29 22:29 ` Maciej W. Rozycki 2019-10-01 8:24 ` Arnaud Charlet 1 sibling, 0 replies; 23+ messages in thread From: Maciej W. Rozycki @ 2019-09-29 22:29 UTC (permalink / raw) To: Arnaud Charlet; +Cc: gcc-patches On Sat, 28 Sep 2019, Maciej W. Rozycki wrote: > 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 > @@ -843,6 +845,7 @@ doc/gnat-style.pdf: ada/gnat-style.texi > # > # Finally, install the library > # > +gnat-install-lib: gnat-install-tools FYI, after some consideration I've updated this prerequisite to read: gnat-install-lib: | gnat-install-tools I think it matches the current behaviour more accurately, though I guess we might as well remove the prerequisite altogether as the two recipies do not appear to clash with each other (but then the comment will have to be updated accordingly, or removed). I'll post the final version once committed if you agree with this update. Maciej ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v2 1/2] libada: Remove racy duplicate gnatlib installation 2019-09-28 16:46 ` [PATCH v2 " Maciej W. Rozycki 2019-09-29 22:29 ` Maciej W. Rozycki @ 2019-10-01 8:24 ` Arnaud Charlet 2019-10-01 18:40 ` [committed v3 " Maciej W. Rozycki 1 sibling, 1 reply; 23+ messages in thread From: Arnaud Charlet @ 2019-10-01 8:24 UTC (permalink / raw) To: Maciej W. Rozycki; +Cc: gcc-patches, Arnaud Charlet > I have verified this change by running my combined build process where a > native `x86_64-linux-gnu' configuration is built first and then used to > build a `riscv64-linux-gnu' cross-compiler, both with `--disable-libada' > specified, without and with this patch applied. I have added `make -C gcc > gnatlib && make -C gcc gnattools' as an extra build step before `make > install'. > > This has run up to failing to find `riscv64-linux-gnu' system headers in > `make -C gcc gnatlib' as noted above, at which point the installation > trees had both the same contents, including `x86_64-linux-gnu' gnatlib > development files and static libraries as well as gnattools in particular. Can you also please do a native build with --disable-libada and make -C gcc gnatlib && make -C gcc gnattools && make install ? Once successful, the change is OK, thanks for the extra work. Arno ^ permalink raw reply [flat|nested] 23+ messages in thread
* [committed v3 1/2] libada: Remove racy duplicate gnatlib installation 2019-10-01 8:24 ` Arnaud Charlet @ 2019-10-01 18:40 ` Maciej W. Rozycki 0 siblings, 0 replies; 23+ messages in thread From: Maciej W. Rozycki @ 2019-10-01 18:40 UTC (permalink / raw) To: Arnaud Charlet; +Cc: gcc-patches For some reason, presumably historical, the `install-gnatlib' target for the default multilib is invoked twice, once via the `ada.install-common' target in `gcc/ada/gcc-interface/Make-lang.in' invoked from gcc/ and again via the `install-libada' target in libada/. Apart from doing the same twice this is actually harmful in sufficiently parallelized `make' invocation, as the removal of old files performed within the `install-gnatlib' recipe in the former case actually races with the installation of new files done in the latter case, causing the recipe to fail and abort, however non-fatally, having not completed the installation of all the built files needed for the newly-built compiler to work correctly. This can be observed with a native `x86_64-linux-gnu' bootstrap: make[4]: Entering directory '.../gcc/ada' rm -rf .../lib/gcc/x86_64-linux-gnu/10.0.0/adalib rm: cannot remove '.../lib/gcc/x86_64-linux-gnu/10.0.0/adalib': Directory not empty make[4]: *** [gcc-interface/Makefile:512: install-gnatlib] Error 1 make[4]: Leaving directory '.../gcc/ada' make[3]: *** [.../gcc/ada/gcc-interface/Make-lang.in:853: install-gnatlib] Error 2 make[2]: [.../gcc/ada/gcc-interface/Make-lang.in:829: ada.install-common] Error 2 (ignored) which then causes missing files to be reported when an attempt is made to use the newly-installed non-functional compiler to build a `riscv-linux-gnu' cross-compiler: (cd ada/bldtools/sinfo; gnatmake -q xsinfo ; ./xsinfo sinfo.h ) error: "ada.ali" not found, "ada.ads" must be compiled error: "s-memory.ali" not found, "s-memory.adb" must be compiled gnatmake: *** bind failed. /bin/sh: ./xsinfo: No such file or directory make[2]: *** [.../gcc/ada/Make-generated.in:45: ada/sinfo.h] Error 127 make[2]: Leaving directory '.../gcc' make[1]: *** [Makefile:4369: all-gcc] Error 2 make[1]: Leaving directory '...' make: *** [Makefile:965: all] Error 2 Depending on timing `.../lib/gcc/x86_64-linux-gnu/10.0.0/adainclude' may cause an installation failure instead and the resulting compiler may be non-functional in a different way. Only invoke `install-gnatlib' from within gcc/ then if a legacy build process is being used with libada disabled and gnatlib built manually with `make -C gcc gnatlib'. gcc/ * Makefile.in (gnat_install_lib): New variable. * configure.ac: Substitute it. * configure: Regenerate. gcc/ada/ * gcc-interface/Make-lang.in (ada.install-common): Split into... (gnat-install-tools, gnat-install-lib): ... these. --- On Tue, 1 Oct 2019, Arnaud Charlet wrote: > > I have verified this change by running my combined build process where a > > native `x86_64-linux-gnu' configuration is built first and then used to > > build a `riscv64-linux-gnu' cross-compiler, both with `--disable-libada' > > specified, without and with this patch applied. I have added `make -C gcc > > gnatlib && make -C gcc gnattools' as an extra build step before `make > > install'. > > > > This has run up to failing to find `riscv64-linux-gnu' system headers in > > `make -C gcc gnatlib' as noted above, at which point the installation > > trees had both the same contents, including `x86_64-linux-gnu' gnatlib > > development files and static libraries as well as gnattools in particular. > > Can you also please do a native build with --disable-libada and > make -C gcc gnatlib && make -C gcc gnattools && make install > ? I had actually done that already, as described in the first paragraph quoted above. > Once successful, the change is OK, thanks for the extra work. Here's the final version I have committed then, with the small adjustment mentioned earlier on and having brought the formatting of the commit description broken in v2 back to order. Thank you for your review. Maciej Changes from v1: - gnatlib installation now retained in gcc/ada/gcc-interface/Make-lang.in and instead invoked iff `--disable-libada' has been requested at the top level. Changes from v2: - use an ordering dependency only between `gnat-install-lib' and `gnat-install-tools'. --- gcc/Makefile.in | 4 ++++ gcc/ada/gcc-interface/Make-lang.in | 5 ++++- gcc/configure | 15 +++++++++++++-- gcc/configure.ac | 10 ++++++++++ 4 files changed, 31 insertions(+), 3 deletions(-) gcc-lang-no-install-gnatlib.diff Index: gcc/gcc/Makefile.in =================================================================== --- gcc.orig/gcc/Makefile.in +++ gcc/gcc/Makefile.in @@ -1706,6 +1706,10 @@ $(FULL_DRIVER_NAME): ./xgcc # language hooks, generated by configure @language_hooks@ +# Wire in install-gnatlib invocation with `make install' for a configuration +# with top-level libada disabled. +gnat_install_lib = @gnat_install_lib@ + # per-language makefile fragments ifneq ($(LANG_MAKEFRAGS),) include $(LANG_MAKEFRAGS) 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 @@ -822,7 +822,9 @@ doc/gnat-style.pdf: ada/gnat-style.texi # gnatlink, gnatls, gnatmake, gnatname, gnatprep, gnatxref, gnatfind, # gnatclean). # gnatdll is only used on Windows. -ada.install-common: +ada.install-common: $(gnat_install_lib) gnat-install-tools + +gnat-install-tools: $(MKDIR) $(DESTDIR)$(bindir) -if [ -f gnat1$(exeext) ] ; \ then \ @@ -843,6 +845,7 @@ doc/gnat-style.pdf: ada/gnat-style.texi # # Finally, install the library # +gnat-install-lib: | gnat-install-tools -if [ -f gnat1$(exeext) ] ; \ then \ $(MAKE) $(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) install-gnatlib; \ Index: gcc/gcc/configure =================================================================== --- gcc.orig/gcc/configure +++ gcc/gcc/configure @@ -814,6 +814,7 @@ SET_MAKE accel_dir_suffix real_target_noncanonical enable_as_accelerator +gnat_install_lib REPORT_BUGS_TEXI REPORT_BUGS_TO PKGVERSION @@ -7826,6 +7827,16 @@ else fi +# If top-level libada has been disabled, then wire in install-gnatlib +# invocation with `make install', so that one can build and install +# the library manually with `make -C gcc all gnatlib gnattools install'. +if test x"$enable_libada" = xno; then + gnat_install_lib=gnat-install-lib +else + gnat_install_lib= +fi + + if test x"$enable_as_accelerator_for" != x; then $as_echo "#define ACCEL_COMPILER 1" >>confdefs.h @@ -18819,7 +18830,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18822 "configure" +#line 18833 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -18925,7 +18936,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18928 "configure" +#line 18939 "configure" #include "confdefs.h" #if HAVE_DLFCN_H Index: gcc/gcc/configure.ac =================================================================== --- gcc.orig/gcc/configure.ac +++ gcc/gcc/configure.ac @@ -982,6 +982,16 @@ AC_ARG_ENABLE(languages, esac], [enable_languages=c]) +# If top-level libada has been disabled, then wire in install-gnatlib +# invocation with `make install', so that one can build and install +# the library manually with `make -C gcc all gnatlib gnattools install'. +if test x"$enable_libada" = xno; then + gnat_install_lib=gnat-install-lib +else + gnat_install_lib= +fi +AC_SUBST(gnat_install_lib) + if test x"$enable_as_accelerator_for" != x; then AC_DEFINE(ACCEL_COMPILER, 1, [Define if this compiler should be built as the offload target compiler.]) ^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH 2/2] libada: Respect `--enable-version-specific-runtime-libs' 2019-09-25 21:23 [PATCH 0/2] libada: Installation improvements Maciej W. Rozycki 2019-09-25 21:23 ` [PATCH 1/2] libada: Remove racy duplicate gnatlib installation Maciej W. Rozycki @ 2019-09-25 21:23 ` Maciej W. Rozycki 2019-09-26 7:46 ` Arnaud Charlet 2019-12-18 11:23 ` Eric Botcazou 1 sibling, 2 replies; 23+ messages in thread From: Maciej W. Rozycki @ 2019-09-25 21:23 UTC (permalink / raw) To: gcc-patches Respect the `--enable-version-specific-runtime-libs' configuration option in libada/, so that shared gnatlib libraries will be installed in non-version-specific $(toolexeclibdir) if requested. In a cross-compilation environment this helps setting up a consistent sysroot, which can then be shared between the host and the target system. Update the settings of $(toolexecdir) and $(toolexeclibdir), unused till now, to keep the current arrangement in the version-specific case and make the new option to be enabled by default, unlike with the other target libraries, so as to keep existing people's build infrastructure unaffected. Of course if someone does use `--disable-version-specific-runtime-libs' already, then the installation location of shared gnatlib libraries will change, but presumably this is what they do want anyway as the current situation where the option is ignored in libada/ only is an anomaly really rather than one that is expected or desired. gcc/ada/ * gcc-interface/Makefile.in (ADA_RTL_DSO_DIR): New variable. (install-gnatlib): Use it in place of ADA_RTL_OBJ_DIR for shared library installation. libada/ * Makefile.in (toolexecdir, toolexeclibdir): New variables. (LIBADA_FLAGS_TO_PASS): Add `toolexeclibdir'. * configure.ac: Add `--enable-version-specific-runtime-libs'. Update version-specific `toolexecdir' and `toolexeclibdir' from ADA_RTL_OBJ_DIR from gcc/ada/gcc-interface/Makefile.in. * configure: Regenerate. --- gcc/ada/gcc-interface/Makefile.in | 7 ++++--- libada/Makefile.in | 3 +++ libada/configure | 25 ++++++++++++++++++++++--- libada/configure.ac | 20 +++++++++++++++++--- 4 files changed, 46 insertions(+), 9 deletions(-) gcc-install-sysroot-gnatlib.diff Index: gcc/gcc/ada/gcc-interface/Makefile.in =================================================================== --- gcc.orig/gcc/ada/gcc-interface/Makefile.in +++ gcc/gcc/ada/gcc-interface/Makefile.in @@ -534,15 +534,15 @@ install-gnatlib: ../stamp-gnatlib-$(RTSD for file in gnat gnarl; do \ if [ -f $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) ]; then \ $(INSTALL) $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \ - $(DESTDIR)$(ADA_RTL_OBJ_DIR); \ + $(DESTDIR)$(ADA_RTL_DSO_DIR); \ fi; \ if [ -f $(RTSDIR)/lib$${file}$(soext) ]; then \ $(LN_S) lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext) \ - $(DESTDIR)$(ADA_RTL_OBJ_DIR)/lib$${file}$(soext); \ + $(DESTDIR)$(ADA_RTL_DSO_DIR)/lib$${file}$(soext); \ fi; \ if [ -d $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext).dSYM ]; then \ $(CP) -r $(RTSDIR)/lib$${file}$(hyphen)$(LIBRARY_VERSION)$(soext).dSYM \ - $(DESTDIR)$(ADA_RTL_OBJ_DIR); \ + $(DESTDIR)$(ADA_RTL_DSO_DIR); \ fi; \ done # This copy must be done preserving the date on the original file. @@ -882,6 +882,7 @@ b_gnatm.o : b_gnatm.adb ADA_INCLUDE_DIR = $(libsubdir)/adainclude ADA_RTL_OBJ_DIR = $(libsubdir)/adalib +ADA_RTL_DSO_DIR = $(toolexeclibdir) # Special flags Index: gcc/libada/Makefile.in =================================================================== --- gcc.orig/libada/Makefile.in +++ gcc/libada/Makefile.in @@ -38,6 +38,8 @@ target = @target@ prefix = @prefix@ # Nonstandard autoconf-set variables. +toolexecdir = @toolexecdir@ +toolexeclibdir = @toolexeclibdir@ enable_shared = @enable_shared@ LN_S=@LN_S@ @@ -88,6 +90,7 @@ LIBADA_FLAGS_TO_PASS = \ "TRACE=$(TRACE)" \ "MULTISUBDIR=$(MULTISUBDIR)" \ "libsubdir=$(libsubdir)" \ + "toolexeclibdir=$(toolexeclibdir)" \ "objext=$(objext)" \ "prefix=$(prefix)" \ "exeext=.exeext.should.not.be.used " \ Index: gcc/libada/configure =================================================================== --- gcc.orig/libada/configure +++ gcc/libada/configure @@ -702,6 +702,7 @@ ac_subst_files='' ac_user_opts=' enable_option_checking with_build_libsubdir +enable_version_specific_runtime_libs enable_maintainer_mode enable_multilib enable_shared @@ -1325,6 +1326,9 @@ if test -n "$ac_init_help"; then --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-version-specific-runtime-libs + specify that runtime libraries should be installed + in a compiler-specific directory --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer @@ -2215,6 +2219,22 @@ target_subdir=${target_noncanonical} # Command-line options. + +# Check whether --enable-version-specific-runtime-libs was given. +if test "${enable_version_specific_runtime_libs+set}" = set; then : + enableval=$enable_version_specific_runtime_libs; case "$enableval" in + yes|no) + ;; + *) + as_fn_error $? "--enable-version-specific-runtime-libs must be yes or no" "$LINENO" 5 + ;; + esac +else + enable_version_specific_runtime_libs=yes + +fi + + # Very limited version of AC_MAINTAINER_MODE. # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : @@ -2273,8 +2293,8 @@ case ${enable_version_specific_runtime_l # Need the gcc compiler version to know where to install libraries # and header files if --enable-version-specific-runtime-libs option # is selected. - toolexecdir='$(libdir)/gcc/$(target_alias)' - toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)' + toolexecdir='$(libdir)/gcc/$(target_noncanonical)' + toolexeclibdir='$(toolexecdir)/$(version)$(MULTISUBDIR)/adalib' ;; no) if test -n "$with_cross_host" && @@ -2295,7 +2315,6 @@ case ${enable_version_specific_runtime_l esac -#TODO: toolexeclibdir is currently disregarded # Check the compiler. # The same as in boehm-gc and libstdc++. Have to borrow it from there. Index: gcc/libada/configure.ac =================================================================== --- gcc.orig/libada/configure.ac +++ gcc/libada/configure.ac @@ -38,6 +38,21 @@ ACX_NONCANONICAL_TARGET GCC_TOPLEV_SUBDIRS # Command-line options. + +AC_ARG_ENABLE(version-specific-runtime-libs, + [AS_HELP_STRING([--enable-version-specific-runtime-libs], + [specify that runtime libraries should be + installed in a compiler-specific directory])], + [case "$enableval" in + yes|no) + ;; + *) + AC_MSG_ERROR([--enable-version-specific-runtime-libs must be yes or no]) + ;; + esac], + [enable_version_specific_runtime_libs=yes] +) + # Very limited version of AC_MAINTAINER_MODE. AC_ARG_ENABLE([maintainer-mode], [AC_HELP_STRING([--enable-maintainer-mode], @@ -60,8 +75,8 @@ case ${enable_version_specific_runtime_l # Need the gcc compiler version to know where to install libraries # and header files if --enable-version-specific-runtime-libs option # is selected. - toolexecdir='$(libdir)/gcc/$(target_alias)' - toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)' + toolexecdir='$(libdir)/gcc/$(target_noncanonical)' + toolexeclibdir='$(toolexecdir)/$(version)$(MULTISUBDIR)/adalib' ;; no) if test -n "$with_cross_host" && @@ -82,7 +97,6 @@ case ${enable_version_specific_runtime_l esac AC_SUBST(toolexecdir) AC_SUBST(toolexeclibdir) -#TODO: toolexeclibdir is currently disregarded # Check the compiler. # The same as in boehm-gc and libstdc++. Have to borrow it from there. ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 2/2] libada: Respect `--enable-version-specific-runtime-libs' 2019-09-25 21:23 ` [PATCH 2/2] libada: Respect `--enable-version-specific-runtime-libs' Maciej W. Rozycki @ 2019-09-26 7:46 ` Arnaud Charlet 2019-09-26 14:08 ` Maciej W. Rozycki 2019-12-18 11:23 ` Eric Botcazou 1 sibling, 1 reply; 23+ messages in thread From: Arnaud Charlet @ 2019-09-26 7:46 UTC (permalink / raw) To: Maciej W. Rozycki; +Cc: gcc-patches, Arnaud Charlet > Respect the `--enable-version-specific-runtime-libs' configuration > option in libada/, so that shared gnatlib libraries will be installed > in non-version-specific $(toolexeclibdir) if requested. In a > cross-compilation environment this helps setting up a consistent > sysroot, which can then be shared between the host and the target > system. > > Update the settings of $(toolexecdir) and $(toolexeclibdir), unused till > now, to keep the current arrangement in the version-specific case and > make the new option to be enabled by default, unlike with the other > target libraries, so as to keep existing people's build infrastructure > unaffected. Can you clarify what will be the value of ADA_RTL_OBJ_DIR and ADA_RTL_DSO_DIR in the following cases: - no version-specific-runtime-libs configure switch at all (default) - use of --enable-version-specific-runtime-libs - use of --disable-version-specific-runtime-libs Arno ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 2/2] libada: Respect `--enable-version-specific-runtime-libs' 2019-09-26 7:46 ` Arnaud Charlet @ 2019-09-26 14:08 ` Maciej W. Rozycki 2019-09-26 14:14 ` Arnaud Charlet 0 siblings, 1 reply; 23+ messages in thread From: Maciej W. Rozycki @ 2019-09-26 14:08 UTC (permalink / raw) To: Arnaud Charlet; +Cc: gcc-patches On Thu, 26 Sep 2019, Arnaud Charlet wrote: > > Respect the `--enable-version-specific-runtime-libs' configuration > > option in libada/, so that shared gnatlib libraries will be installed > > in non-version-specific $(toolexeclibdir) if requested. In a > > cross-compilation environment this helps setting up a consistent > > sysroot, which can then be shared between the host and the target > > system. > > > > Update the settings of $(toolexecdir) and $(toolexeclibdir), unused till > > now, to keep the current arrangement in the version-specific case and > > make the new option to be enabled by default, unlike with the other > > target libraries, so as to keep existing people's build infrastructure > > unaffected. > > Can you clarify what will be the value of ADA_RTL_OBJ_DIR and ADA_RTL_DSO_DIR > in the following cases: > > - no version-specific-runtime-libs configure switch at all (default) ADA_RTL_OBJ_DIR=$(libsubdir)/adalib ADA_RTL_DSO_DIR=$(libdir)/gcc/$(target_noncanonical)/$(version)$(MULTISUBDIR)/adalib e.g. (no multilibs): ADA_RTL_OBJ_DIR=$(prefix)/lib/gcc/x86_64-linux-gnu/10.0.0/adalib ADA_RTL_DSO_DIR=$(prefix)/lib/gcc/x86_64-linux-gnu/10.0.0/adalib or (with multilibs): ADA_RTL_OBJ_DIR=$(prefix)/lib/gcc/riscv64-linux-gnu/10.0.0/lib32/ilp32/adalib ADA_RTL_DSO_DIR=$(prefix)/lib/gcc/riscv64-linux-gnu/10.0.0/lib32/ilp32/adalib ADA_RTL_OBJ_DIR=$(prefix)/lib/gcc/riscv64-linux-gnu/10.0.0/lib32/ilp32d/adalib ADA_RTL_DSO_DIR=$(prefix)/lib/gcc/riscv64-linux-gnu/10.0.0/lib32/ilp32d/adalib ADA_RTL_OBJ_DIR=$(prefix)/lib/gcc/riscv64-linux-gnu/10.0.0/lib64/lp64/adalib ADA_RTL_DSO_DIR=$(prefix)/lib/gcc/riscv64-linux-gnu/10.0.0/lib64/lp64/adalib [...] > - use of --enable-version-specific-runtime-libs Same as above. > - use of --disable-version-specific-runtime-libs ADA_RTL_OBJ_DIR=$(libsubdir)/adalib ADA_RTL_DSO_DIR varies in Makefile as the multilib part is now set by `configure' as with other target libraries, so with `x86_64-linux-gnu' (native) I have: ADA_RTL_DSO_DIR=$(libdir)/../lib64 and with `riscv64-linux-gnu' (cross) I have e.g.: ADA_RTL_DSO_DIR=$(exec_prefix)/$(target_alias)/lib/../lib64/lp64d and then specifically (no multilibs): ADA_RTL_OBJ_DIR=$(prefix)/lib/gcc/x86_64-linux-gnu/10.0.0/adalib ADA_RTL_DSO_DIR=$(prefix)/lib64 or (with multilibs): ADA_RTL_OBJ_DIR=$(prefix)/lib/gcc/riscv64-linux-gnu/10.0.0/lib32/ilp32/adalib ADA_RTL_DSO_DIR=$(prefix)/riscv64-linux-gnu/lib32/ilp32 ADA_RTL_OBJ_DIR=$(prefix)/lib/gcc/riscv64-linux-gnu/10.0.0/lib32/ilp32d/adalib ADA_RTL_DSO_DIR=$(prefix)/riscv64-linux-gnu/lib32/ilp32d ADA_RTL_OBJ_DIR=$(prefix)/lib/gcc/riscv64-linux-gnu/10.0.0/lib64/lp64/adalib ADA_RTL_DSO_DIR=$(prefix)/riscv64-linux-gnu/lib64/lp64 [...] Notice that ADA_RTL_OBJ_DIR never changes with/without the use of this configuration option (as expected). Does it answer your question? Maciej ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 2/2] libada: Respect `--enable-version-specific-runtime-libs' 2019-09-26 14:08 ` Maciej W. Rozycki @ 2019-09-26 14:14 ` Arnaud Charlet 2019-09-27 0:40 ` Maciej W. Rozycki 0 siblings, 1 reply; 23+ messages in thread From: Arnaud Charlet @ 2019-09-26 14:14 UTC (permalink / raw) To: Maciej W. Rozycki; +Cc: gcc-patches, Arnaud Charlet > Notice that ADA_RTL_OBJ_DIR never changes with/without the use of this > configuration option (as expected). > > Does it answer your question? Yes, that's now very clear, thanks! The change is OK for me, thanks. Arno ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 2/2] libada: Respect `--enable-version-specific-runtime-libs' 2019-09-26 14:14 ` Arnaud Charlet @ 2019-09-27 0:40 ` Maciej W. Rozycki 2019-09-27 7:16 ` Arnaud Charlet 0 siblings, 1 reply; 23+ messages in thread From: Maciej W. Rozycki @ 2019-09-27 0:40 UTC (permalink / raw) To: Arnaud Charlet; +Cc: gcc-patches On Thu, 26 Sep 2019, Arnaud Charlet wrote: > > Notice that ADA_RTL_OBJ_DIR never changes with/without the use of this > > configuration option (as expected). > > > > Does it answer your question? > > Yes, that's now very clear, thanks! Sorry not to make the original change description clear enough. > The change is OK for me, thanks. Thanks for your review. Shall I amend the change description anyhow then? I know it has not (as yet, as discussed at the GNU Tools Cauldron recently) been enforced for the GCC project (unlike with e.g. glibc), however I mean to use it whole as the commit message, which is what I have been doing for quite a while now, because I recognise the value of change descriptions for future repository examination. Maciej ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 2/2] libada: Respect `--enable-version-specific-runtime-libs' 2019-09-27 0:40 ` Maciej W. Rozycki @ 2019-09-27 7:16 ` Arnaud Charlet 2019-10-01 19:16 ` Maciej W. Rozycki 0 siblings, 1 reply; 23+ messages in thread From: Arnaud Charlet @ 2019-09-27 7:16 UTC (permalink / raw) To: Maciej W. Rozycki; +Cc: gcc-patches > Shall I amend the change description anyhow then? I know it has not (as > yet, as discussed at the GNU Tools Cauldron recently) been enforced for > the GCC project (unlike with e.g. glibc), however I mean to use it whole > as the commit message, which is what I have been doing for quite a while > now, because I recognise the value of change descriptions for future > repository examination. Sure, add any needed clarification. ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 2/2] libada: Respect `--enable-version-specific-runtime-libs' 2019-09-27 7:16 ` Arnaud Charlet @ 2019-10-01 19:16 ` Maciej W. Rozycki 0 siblings, 0 replies; 23+ messages in thread From: Maciej W. Rozycki @ 2019-10-01 19:16 UTC (permalink / raw) To: Arnaud Charlet; +Cc: gcc-patches On Fri, 27 Sep 2019, Arnaud Charlet wrote: > > Shall I amend the change description anyhow then? I know it has not (as > > yet, as discussed at the GNU Tools Cauldron recently) been enforced for > > the GCC project (unlike with e.g. glibc), however I mean to use it whole > > as the commit message, which is what I have been doing for quite a while > > now, because I recognise the value of change descriptions for future > > repository examination. > > Sure, add any needed clarification. I have added this: This lets one have `libgnarl-10.so' and `libgnat-10.so' installed in say /usr/lib and /usr/$(target_alias)/lib for a native and a cross-build respectively, rather than in /usr/lib/gcc/$(target_alias)/10.0.0/adalib. and committed the change now. Maciej ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 2/2] libada: Respect `--enable-version-specific-runtime-libs' 2019-09-25 21:23 ` [PATCH 2/2] libada: Respect `--enable-version-specific-runtime-libs' Maciej W. Rozycki 2019-09-26 7:46 ` Arnaud Charlet @ 2019-12-18 11:23 ` Eric Botcazou 2019-12-18 11:30 ` Maciej W. Rozycki 1 sibling, 1 reply; 23+ messages in thread From: Eric Botcazou @ 2019-12-18 11:23 UTC (permalink / raw) To: Maciej W. Rozycki; +Cc: gcc-patches > gcc/ada/ > * gcc-interface/Makefile.in (ADA_RTL_DSO_DIR): New variable. > (install-gnatlib): Use it in place of ADA_RTL_OBJ_DIR for shared > library installation. > > libada/ > * Makefile.in (toolexecdir, toolexeclibdir): New variables. > (LIBADA_FLAGS_TO_PASS): Add `toolexeclibdir'. > * configure.ac: Add `--enable-version-specific-runtime-libs'. > Update version-specific `toolexecdir' and `toolexeclibdir' from > ADA_RTL_OBJ_DIR from gcc/ada/gcc-interface/Makefile.in. > * configure: Regenerate. This breaks with --disable-libada because $(toolexeclibdir) is not set. -- Eric Botcazou ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 2/2] libada: Respect `--enable-version-specific-runtime-libs' 2019-12-18 11:23 ` Eric Botcazou @ 2019-12-18 11:30 ` Maciej W. Rozycki 2019-12-20 0:26 ` Maciej W. Rozycki 0 siblings, 1 reply; 23+ messages in thread From: Maciej W. Rozycki @ 2019-12-18 11:30 UTC (permalink / raw) To: Eric Botcazou; +Cc: gcc-patches On Wed, 18 Dec 2019, Eric Botcazou wrote: > > gcc/ada/ > > * gcc-interface/Makefile.in (ADA_RTL_DSO_DIR): New variable. > > (install-gnatlib): Use it in place of ADA_RTL_OBJ_DIR for shared > > library installation. > > > > libada/ > > * Makefile.in (toolexecdir, toolexeclibdir): New variables. > > (LIBADA_FLAGS_TO_PASS): Add `toolexeclibdir'. > > * configure.ac: Add `--enable-version-specific-runtime-libs'. > > Update version-specific `toolexecdir' and `toolexeclibdir' from > > ADA_RTL_OBJ_DIR from gcc/ada/gcc-interface/Makefile.in. > > * configure: Regenerate. > > This breaks with --disable-libada because $(toolexeclibdir) is not set. Sorry about the breakage, I'll look into it right away. Maciej ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 2/2] libada: Respect `--enable-version-specific-runtime-libs' 2019-12-18 11:30 ` Maciej W. Rozycki @ 2019-12-20 0:26 ` Maciej W. Rozycki 2019-12-20 10:34 ` Eric Botcazou 0 siblings, 1 reply; 23+ messages in thread From: Maciej W. Rozycki @ 2019-12-20 0:26 UTC (permalink / raw) To: Eric Botcazou; +Cc: gcc-patches Eric, On Wed, 18 Dec 2019, Maciej W. Rozycki wrote: > On Wed, 18 Dec 2019, Eric Botcazou wrote: > > > > gcc/ada/ > > > * gcc-interface/Makefile.in (ADA_RTL_DSO_DIR): New variable. > > > (install-gnatlib): Use it in place of ADA_RTL_OBJ_DIR for shared > > > library installation. > > > > > > libada/ > > > * Makefile.in (toolexecdir, toolexeclibdir): New variables. > > > (LIBADA_FLAGS_TO_PASS): Add `toolexeclibdir'. > > > * configure.ac: Add `--enable-version-specific-runtime-libs'. > > > Update version-specific `toolexecdir' and `toolexeclibdir' from > > > ADA_RTL_OBJ_DIR from gcc/ada/gcc-interface/Makefile.in. > > > * configure: Regenerate. > > > > This breaks with --disable-libada because $(toolexeclibdir) is not set. > > Sorry about the breakage, I'll look into it right away. Can you please be a little more specific as to what kind of breakage you see and/or specific configuration options and steps required to reproduce it? I have rebuilt GCC with `--disable-libada' and it didn't cause any anomalies I could notice whether `--enable-version-specific-runtime-libs' or `--disable-version-specific-runtime-libs' has been used. I wouldn't expect any anyway, as shared libgnat and libgnarl libraries are not built in this case, so $(toolexeclibdir) is not supposed to be used. Maciej ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH 2/2] libada: Respect `--enable-version-specific-runtime-libs' 2019-12-20 0:26 ` Maciej W. Rozycki @ 2019-12-20 10:34 ` Eric Botcazou 2019-12-21 4:53 ` [PATCH] libada: Fix shared library installation with `--disable-libada' Maciej W. Rozycki 0 siblings, 1 reply; 23+ messages in thread From: Eric Botcazou @ 2019-12-20 10:34 UTC (permalink / raw) To: Maciej W. Rozycki; +Cc: gcc-patches > Can you please be a little more specific as to what kind of breakage you > see and/or specific configuration options and steps required to reproduce > it? /usr/bin/install: missing destination file operand after 'rts/libgnat-21.so' Try '/usr/bin/install --help' for more information. ln: failed to create symbolic link '/libgnat.so': Permission denied /usr/bin/install: missing destination file operand after 'rts/libgnarl-21.so' Try '/usr/bin/install --help' for more information. ln: failed to create symbolic link '/libgnarl.so': Permission denied > I have rebuilt GCC with `--disable-libada' and it didn't cause any > anomalies I could notice whether `--enable-version-specific-runtime-libs' > or `--disable-version-specific-runtime-libs' has been used. I wouldn't > expect any anyway, as shared libgnat and libgnarl libraries are not built > in this case, so $(toolexeclibdir) is not supposed to be used. Yes, shared libraries are built with "make -C gcc gnatlib-shared gnattools". -- Eric Botcazou ^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH] libada: Fix shared library installation with `--disable-libada' 2019-12-20 10:34 ` Eric Botcazou @ 2019-12-21 4:53 ` Maciej W. Rozycki 2019-12-21 12:07 ` Eric Botcazou 0 siblings, 1 reply; 23+ messages in thread From: Maciej W. Rozycki @ 2019-12-21 4:53 UTC (permalink / raw) To: Eric Botcazou; +Cc: gcc-patches Provide a default value of $(toolexeclibdir) for $(ADA_RTL_DSO_DIR), so that in a `--disable-libada' configuration `make install' places shared gnatlib libraries, built with `make -C gcc gnatlib-shared', in their intended version-specific location, fixing a commit r276424 ("libada: Respect `--enable-version-specific-runtime-libs'") regression. gcc/ada/ * gcc-interface/Makefile.in (toolexeclibdir): New variable. --- On Fri, 20 Dec 2019, Eric Botcazou wrote: > > I have rebuilt GCC with `--disable-libada' and it didn't cause any > > anomalies I could notice whether `--enable-version-specific-runtime-libs' > > or `--disable-version-specific-runtime-libs' has been used. I wouldn't > > expect any anyway, as shared libgnat and libgnarl libraries are not built > > in this case, so $(toolexeclibdir) is not supposed to be used. > > Yes, shared libraries are built with "make -C gcc gnatlib-shared gnattools". Oops, I think it was missed in the original review. Fixed thus, and verified with and without `--disable-libada', ensuring that shared libgnat and libgnarl libraries arrive at their intended places upon `make install'. OK to apply? Maciej --- gcc/ada/gcc-interface/Makefile.in | 6 ++++++ 1 file changed, 6 insertions(+) gcc-ada-toolexeclibdir.diff Index: gcc/gcc/ada/gcc-interface/Makefile.in =================================================================== --- gcc.orig/gcc/ada/gcc-interface/Makefile.in +++ gcc/gcc/ada/gcc-interface/Makefile.in @@ -880,6 +880,12 @@ b_gnatm.o : b_gnatm.adb $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) -gnatws -gnatyN \ $< $(OUTPUT_OPTION) +# Provide a `toolexeclibdir' definition for when `gnat-install-lib' is +# wired through gcc/ in a configuration with top-level libada disabled. +# It will be overriden with the value configured when `gnat-install-lib' +# is invoked through libada/. +toolexeclibdir = $(ADA_RTL_OBJ_DIR) + ADA_INCLUDE_DIR = $(libsubdir)/adainclude ADA_RTL_OBJ_DIR = $(libsubdir)/adalib ADA_RTL_DSO_DIR = $(toolexeclibdir) ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH] libada: Fix shared library installation with `--disable-libada' 2019-12-21 4:53 ` [PATCH] libada: Fix shared library installation with `--disable-libada' Maciej W. Rozycki @ 2019-12-21 12:07 ` Eric Botcazou 2019-12-22 0:30 ` Maciej W. Rozycki 0 siblings, 1 reply; 23+ messages in thread From: Eric Botcazou @ 2019-12-21 12:07 UTC (permalink / raw) To: Maciej W. Rozycki; +Cc: gcc-patches > Fixed thus, and verified with and without `--disable-libada', ensuring > that shared libgnat and libgnarl libraries arrive at their intended places > upon `make install'. > > OK to apply? Yes (modulo s/overriden/overridden), thanks for the quick turn around. -- Eric Botcazou ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH] libada: Fix shared library installation with `--disable-libada' 2019-12-21 12:07 ` Eric Botcazou @ 2019-12-22 0:30 ` Maciej W. Rozycki 0 siblings, 0 replies; 23+ messages in thread From: Maciej W. Rozycki @ 2019-12-22 0:30 UTC (permalink / raw) To: Eric Botcazou; +Cc: gcc-patches On Sat, 21 Dec 2019, Eric Botcazou wrote: > > Fixed thus, and verified with and without `--disable-libada', ensuring > > that shared libgnat and libgnarl libraries arrive at their intended places > > upon `make install'. > > > > OK to apply? > > Yes (modulo s/overriden/overridden), thanks for the quick turn around. Thanks for catching the typo and the review. Change applied now. Maciej ^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2019-12-22 0:17 UTC | newest] Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-09-25 21:23 [PATCH 0/2] libada: Installation improvements Maciej W. Rozycki 2019-09-25 21:23 ` [PATCH 1/2] libada: Remove racy duplicate gnatlib installation Maciej W. Rozycki 2019-09-26 7:43 ` Arnaud Charlet 2019-09-27 0:37 ` Maciej W. Rozycki 2019-09-27 7:15 ` Arnaud Charlet 2019-09-28 16:46 ` [PATCH v2 " Maciej W. Rozycki 2019-09-29 22:29 ` Maciej W. Rozycki 2019-10-01 8:24 ` Arnaud Charlet 2019-10-01 18:40 ` [committed v3 " Maciej W. Rozycki 2019-09-25 21:23 ` [PATCH 2/2] libada: Respect `--enable-version-specific-runtime-libs' Maciej W. Rozycki 2019-09-26 7:46 ` Arnaud Charlet 2019-09-26 14:08 ` Maciej W. Rozycki 2019-09-26 14:14 ` Arnaud Charlet 2019-09-27 0:40 ` Maciej W. Rozycki 2019-09-27 7:16 ` Arnaud Charlet 2019-10-01 19:16 ` Maciej W. Rozycki 2019-12-18 11:23 ` Eric Botcazou 2019-12-18 11:30 ` Maciej W. Rozycki 2019-12-20 0:26 ` Maciej W. Rozycki 2019-12-20 10:34 ` Eric Botcazou 2019-12-21 4:53 ` [PATCH] libada: Fix shared library installation with `--disable-libada' Maciej W. Rozycki 2019-12-21 12:07 ` Eric Botcazou 2019-12-22 0:30 ` Maciej W. Rozycki
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).