summaryrefslogtreecommitdiff
path: root/libada
diff options
context:
space:
mode:
Diffstat (limited to 'libada')
-rw-r--r--libada/ChangeLog8
-rw-r--r--libada/Makefile.in2
-rwxr-xr-xlibada/configure19
-rw-r--r--libada/configure.ac3
4 files changed, 31 insertions, 1 deletions
diff --git a/libada/ChangeLog b/libada/ChangeLog
index 245c796f8668..de1dfa09fb09 100644
--- a/libada/ChangeLog
+++ b/libada/ChangeLog
@@ -1,3 +1,11 @@
+2017-01-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR other/79046
+ * configure.ac: Add GCC_BASE_VER.
+ * Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
+ version from BASE-VER file.
+ * configure: Regenerated.
+
2017-01-04 Alan Modra <amodra@gmail.com>
* Makefile.in (configure_deps): Update and order as per
diff --git a/libada/Makefile.in b/libada/Makefile.in
index c61dfcf06a8b..328c067c4cda 100644
--- a/libada/Makefile.in
+++ b/libada/Makefile.in
@@ -67,7 +67,7 @@ host_subdir = @host_subdir@
GCC_DIR=$(MULTIBUILDTOP)../../$(host_subdir)/gcc
target_noncanonical:=@target_noncanonical@
-version := $(shell cat $(srcdir)/../gcc/BASE-VER)
+version := $(shell @get_gcc_base_ver@ $(srcdir)/../gcc/BASE-VER)
libsubdir := $(libdir)/gcc/$(target_noncanonical)/$(version)$(MULTISUBDIR)
ADA_RTS_DIR=$(GCC_DIR)/ada/rts$(subst /,_,$(MULTISUBDIR))
ADA_RTS_SUBDIR=./rts$(subst /,_,$(MULTISUBDIR))
diff --git a/libada/configure b/libada/configure
index 3b9f4ae3c5b8..5ab0e211aa0e 100755
--- a/libada/configure
+++ b/libada/configure
@@ -553,6 +553,7 @@ PACKAGE_URL=
ac_unique_file="Makefile.in"
ac_subst_vars='LTLIBOBJS
LIBOBJS
+get_gcc_base_ver
have_getipinfo
default_gnatlib_target
LN_S
@@ -633,6 +634,7 @@ enable_maintainer_mode
enable_multilib
enable_shared
with_system_libunwind
+with_gcc_major_version_only
'
ac_precious_vars='build_alias
host_alias
@@ -1261,6 +1263,8 @@ Optional Packages:
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-build-libsubdir=DIR Directory where to find libraries for build system
--with-system-libunwind use installed libunwind
+ --with-gcc-major-version-only
+ use only GCC major number in filesystem paths
Some influential environment variables:
CC C compiler command
@@ -3008,6 +3012,21 @@ if test x$have_unwind_getipinfo = xyes; then
fi
+# Determine what GCC version number to use in filesystem paths.
+
+ get_gcc_base_ver="cat"
+
+# Check whether --with-gcc-major-version-only was given.
+if test "${with_gcc_major_version_only+set}" = set; then :
+ withval=$with_gcc_major_version_only; if test x$with_gcc_major_version_only = xyes ; then
+ get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'"
+ fi
+
+fi
+
+
+
+
# Output: create a Makefile.
ac_config_files="$ac_config_files Makefile"
diff --git a/libada/configure.ac b/libada/configure.ac
index 389e2bb6c6b4..3e0f0a352104 100644
--- a/libada/configure.ac
+++ b/libada/configure.ac
@@ -144,6 +144,9 @@ if test x$have_unwind_getipinfo = xyes; then
fi
AC_SUBST(have_getipinfo)
+# Determine what GCC version number to use in filesystem paths.
+GCC_BASE_VER
+
# Output: create a Makefile.
AC_CONFIG_FILES([Makefile])