This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gfortran patch] use libtool version info


Although the VERSION_libtool is set to 6:0:0, the library that is
built has '0' in it's soname. The simple fix is to define 

    libgfortran_la_LDFLAGS = -version-info $(libtool_VERSION)

in the Makefile.am, but requires regenerating the files when the
soname changes. The following patch puts the version in it's own file
as done for the other runtime libraries.

Ok to checkin?

Is there a reason to start with 6 as the version number? Or should the
be 1?

	Matthias



2004-07-04  Matthias Klose  <doko@debian.org>

	* libtool-version: New.
	* Makefile.am (libgfortran_la_LDFLAGS): Use -version-info for soname.
	* Makefile.in: Regenerate.
	* configure.ac: Remove libtool_VERSION macro
	* configure.in: Regenerate

 
diff -urN libgfortran.old/Makefile.am libgfortran/Makefile.am
--- libgfortran.old/Makefile.am	2004-06-15 09:55:46.000000000 +0200
+++ libgfortran/Makefile.am	2004-07-04 06:17:36.000000000 +0200
@@ -6,6 +6,8 @@
 
 toolexeclib_LTLIBRARIES = libgfortran.la libgfortranbegin.la
 
+libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version`
+
 ## This should really go in the compiler lib dir, not the system lib dir.
 libgfortranbegin_la_SOURCES = fmain.c
 libgfortranbegin_la_LDFLAGS = -static
diff -urN libgfortran.old/Makefile.in libgfortran/Makefile.in
--- libgfortran.old/Makefile.in	2004-06-25 00:45:57.000000000 +0200
+++ libgfortran/Makefile.in	2004-07-04 06:20:17.000000000 +0200
@@ -263,7 +263,6 @@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
-libtool_VERSION = @libtool_VERSION@
 localstatedir = @localstatedir@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
@@ -283,6 +282,7 @@
 toolexeclibdir = @toolexeclibdir@
 AM_CFLAGS = -std=gnu99
 toolexeclib_LTLIBRARIES = libgfortran.la libgfortranbegin.la
+libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version`
 libgfortranbegin_la_SOURCES = fmain.c
 libgfortranbegin_la_LDFLAGS = -static
 AM_CPPFLAGS = -I$(srcdir)/io
diff -urN libgfortran.old/configure.ac libgfortran/configure.ac
--- libgfortran.old/configure.ac	2004-06-25 00:45:32.000000000 +0200
+++ libgfortran/configure.ac	2004-07-04 06:19:34.000000000 +0200
@@ -5,10 +5,6 @@
 AC_INIT([GNU Fortran Runtime Library], 0.2,,[libgfortran])
 AC_CONFIG_HEADER(config.h)
 
-# For libtool versioning info, format is CURRENT:REVISION:AGE
-libtool_VERSION=6:0:0
-AC_SUBST(libtool_VERSION)
-
 # -------
 # Options
 # -------
diff -urN libgfortran.old/libtool-version libgfortran/libtool-version
--- libgfortran.old/libtool-version	1970-01-01 01:00:00.000000000 +0100
+++ libgfortran/libtool-version	2004-07-04 06:19:14.000000000 +0200
@@ -0,0 +1,6 @@
+# This file is used to maintain libtool version info for libgfortran.
+# See the libtool manual to understand the meaning of the fields.
+# This is a separate file so that version updates don't involve re-running
+# automake.
+# CURRENT:REVISION:AGE
+6:0:0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]