aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@wdc.com>2019-10-01 19:14:11 +0000
committerMaciej W. Rozycki <macro@gcc.gnu.org>2019-10-01 19:14:11 +0000
commit13681906ff1d22ee9dd6f6c58dff6539c2cc89c7 (patch)
tree7a82ee6116b5ac5aad650a767b768212da78509d /gcc/ada
parent8951374df1e7139b163129c9e18161c5253d0fe2 (diff)
downloadgcc-13681906ff1d22ee9dd6f6c58dff6539c2cc89c7.zip
gcc-13681906ff1d22ee9dd6f6c58dff6539c2cc89c7.tar.gz
gcc-13681906ff1d22ee9dd6f6c58dff6539c2cc89c7.tar.bz2
libada: Respect `--enable-version-specific-runtime-libs'
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. 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. 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. From-SVN: r276424
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog6
-rw-r--r--gcc/ada/gcc-interface/Makefile.in7
2 files changed, 10 insertions, 3 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index ecc2e25..6a84b7b 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,11 @@
2019-10-01 Maciej W. Rozycki <macro@wdc.com>
+ * 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.
+
+2019-10-01 Maciej W. Rozycki <macro@wdc.com>
+
* gcc-interface/Make-lang.in (ada.install-common): Split into...
(gnat-install-tools, gnat-install-lib): ... these.
diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
index d4c9d15..8deffb6 100644
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -534,15 +534,15 @@ install-gnatlib: ../stamp-gnatlib-$(RTSDIR) install-gcc-specs
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