]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
cobol/119281 - make sure $(gcc_version) is set for libgcobol install
authorRichard Biener <rguenther@suse.de>
Fri, 14 Mar 2025 12:09:31 +0000 (13:09 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 14 Mar 2025 12:32:15 +0000 (13:32 +0100)
When using --enable-version-specific-runtime-libs at least it's
required that $(gcc_version) is set to be able to expand
toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'

The following fixes this by adjusting configure.ac to call GCC_BASE_VER
and Makefile.am to include a definition for gcc_version.

libgcobol/
* Makefile.am: Define gcc_version.
* configure.ac: Execute GCC_BASE_VER.
* Makefile.in: Regenerated.
* configure: Likewise.

libgcobol/Makefile.am
libgcobol/Makefile.in
libgcobol/configure
libgcobol/configure.ac

index bee294e0c9de0364d65f14492eb4fd36024ff187..eddf209807e600fe5ee5ec212fcd7deb58b11255 100644 (file)
@@ -22,6 +22,9 @@
 AUTOMAKE_OPTIONS = 1.8 foreign
 ACLOCAL_AMFLAGS = -I .. -I ../config
 
+# May be used by various substitution variables.
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
+
 if BUILD_LIBGCOBOL
 toolexeclib_LTLIBRARIES  = libgcobol.la
 endif
index c93e9246e378cfe2d485d997a9fdb9791a2396c4..a6096d2a64aa9dbb163ef5c11d7a712c50c32281 100644 (file)
@@ -403,6 +403,9 @@ top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 AUTOMAKE_OPTIONS = 1.8 foreign
 ACLOCAL_AMFLAGS = -I .. -I ../config
+
+# May be used by various substitution variables.
+gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
 @BUILD_LIBGCOBOL_TRUE@toolexeclib_LTLIBRARIES = libgcobol.la
 libgcobol_la_SOURCES = \
        charmaps.cc                             \
index bd946b65fc28f68e689669b9f649a7c434fa288c..73433ebb13de5f9b151dbd1fae68a63e9547e6dd 100755 (executable)
@@ -635,7 +635,6 @@ am__EXEEXT_TRUE
 LTLIBOBJS
 LIBOBJS
 extra_darwin_ldflags_libgcobol
-get_gcc_base_ver
 VERSION_SUFFIX
 LIBGCOBOL_VERSION
 SPEC_LIBGCOBOL_DEPS
@@ -674,6 +673,7 @@ CXXFLAGS
 CXX
 MAINTAINER_MODE_FALSE
 MAINTAINER_MODE_TRUE
+get_gcc_base_ver
 toolexeclibdir
 toolexecdir
 MAINT
@@ -796,6 +796,7 @@ with_toolexeclibdir
 enable_version_specific_runtime_libs
 with_slibdir
 enable_maintainer_mode
+with_gcc_major_version_only
 enable_shared
 enable_static
 with_pic
@@ -803,7 +804,6 @@ enable_fast_install
 with_gnu_ld
 enable_libtool_lock
 enable_darwin_at_rpath
-with_gcc_major_version_only
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1466,11 +1466,11 @@ Optional Packages:
                           install libraries built with a cross compiler within
                           DIR
   --with-slibdir=DIR      shared libraries in DIR LIBDIR
+  --with-gcc-major-version-only
+                          use only GCC major number in filesystem paths
   --with-pic              try to use only PIC/non-PIC objects [default=use
                           both]
   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
-  --with-gcc-major-version-only
-                          use only GCC major number in filesystem paths
 
 Some influential environment variables:
   CC          C compiler command
@@ -5192,6 +5192,21 @@ esac
 
 
 
+# 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
+
+
+
+
 
 
 
@@ -12876,7 +12891,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12879 "configure"
+#line 12894 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12982,7 +12997,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12985 "configure"
+#line 13000 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index ec6658124468ac78a9b97472710093a7a191ec90..2e4a88ef77fc3f21b1fce1d85e4c7e50dd7ac9cf 100644 (file)
@@ -170,6 +170,9 @@ esac
 AC_SUBST(toolexecdir)
 AC_SUBST(toolexeclibdir)
 
+# Determine what GCC version number to use in filesystem paths.
+GCC_BASE_VER
+
 AH_TEMPLATE(PACKAGE, [Name of package])
 AH_TEMPLATE(VERSION, [Version number of package])