soname patch for gas2

H.J. Lu hjl@lucon.org
Thu Dec 11 08:35:00 GMT 1997


> 
>    From: hjl@lucon.org (H.J. Lu)
>    Date: Mon, 8 Dec 1997 14:22:04 -0800 (PST)
> 
>    >    Does soname work now? Thanks.
>    > 
>    > In what way was it broken?  As far as I know, it has worked for a
>    > couple of years now.
> 
>    The new gas snapshot has libbfd.so.0.0.0. I'd like to see
>    libbfd.so.2.8.1.0.18. Unfortunately there is no easy way
>    to do it since I can only get libbfd.so.2.8.1 even if I
>    want to make a binutils 2.8.1.0.18 for Linux. If I use
>    libbfd.so.2.8.1, it will confuse people.
> 
> Oh that.  No, that hasn't been fixed yet.  Getting the version number
> to match the release number is a libtool issue.  If you figure out a
> clean patch, I'll be happy to use it.
> 
> Ian
> 

Here is the patch. I need extension for Linux since I have to make
binutils 2.8.x.0.x for Linux. Otherwise, I have to use 2.8.x. It will
be quite confusing.

BTW, bfd/VERINFO doesn't have to be updated as often as VERSION.

Thanks.


-- 
H.J. Lu (hjl@gnu.org)
--
Thu Dec 11 08:22:42 1997  H.J. Lu  (hjl@gnu.org)

	* ltmain.sh (extension): New. Set from $vinfo.
	(versuffix): Add $extension for Linux.

Thu Dec 11 08:22:42 1997  H.J. Lu  (hjl@gnu.org)

	* bfd/Makefile.am (libbfd_la_LDFLAGS): New.
	(config.status): Depend on $(srcdir)/VERINFO.

	* bfd/configure.in (VERINFO): Substitute it.

	* bfd/VERINFO: New.

Thu Dec 11 08:22:42 1997  H.J. Lu  (hjl@gnu.org)

	* opcodes/Makefile.am (libopcodes_la_LDFLAGS): New.
	(config.status): Depend on $(srcdir)/../bfd/VERINFO.

	* opcodes/configure.in (VERINFO): Substitute it.

Index: ltmain.sh
===================================================================
RCS file: /home/work/cvs/gnu/binutils/ltmain.sh,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 ltmain.sh
--- ltmain.sh	1997/11/18 17:24:56	1.1.1.2
+++ ltmain.sh	1997/12/11 09:06:52
@@ -609,6 +609,7 @@
       current=0
       revision=0
       age=0
+      extension=
 
       if test -n "$objs"; then
 	echo "$progname: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1
@@ -631,7 +632,7 @@
       set dummy $vinfo
       IFS="$save_ifs"
 
-      if test -n "$5"; then
+      if test -n "$6"; then
         echo "$progname: too many parameters to \`-version-info'" 1>&2
 	echo "$help" 1>&2
 	exit 1
@@ -640,6 +641,7 @@
       test -n "$2" && current="$2"
       test -n "$3" && revision="$3"
       test -n "$4" && age="$4"
+      test -n "$5" && extension="$5"
 
       # Check that each of the things are valid numbers.
       case "$current" in
@@ -683,7 +685,11 @@
       linux)
 	version_vars="$version_vars major versuffix"
 	major=`expr $current - $age`
-	versuffix="$major.$age.$revision"
+	if test -n "$extension"; then
+	  versuffix="$major.$age.$revision.$extension"
+	else
+	  versuffix="$major.$age.$revision"
+	fi
 	;;
 
       osf)
Index: bfd/Makefile.am
===================================================================
RCS file: /home/work/cvs/gnu/binutils/bfd/Makefile.am,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Makefile.am
--- bfd/Makefile.am	1997/10/25 21:56:17	1.1.1.1
+++ bfd/Makefile.am	1997/12/11 16:01:42
@@ -461,6 +463,9 @@
 	$(INSTALL_DATA) $(INCDIR)/ansidecl.h $(includedir)/ansidecl.h
 	$(INSTALL_DATA) $(INCDIR)/bfdlink.h $(includedir)/bfdlink.h
 
+libbfd_la_LDFLAGS=-version-info @VERINFO@
+config.status: $(srcdir)/VERINFO
+
 # Have to get rid of .dep1 here so that "$?" later includes all of $(CFILES).
 .dep: dep.sed $(CFILES) $(HFILES) bfd.h
 	rm -f .dep1
Index: bfd/configure.in
===================================================================
RCS file: /home/work/cvs/gnu/binutils/bfd/configure.in,v
retrieving revision 1.1.1.34
diff -u -r1.1.1.34 configure.in
--- bfd/configure.in	1997/11/18 17:27:05	1.1.1.34
+++ bfd/configure.in	1997/12/11 16:15:34
@@ -584,6 +585,22 @@
 AC_SUBST(all_backends)
 AC_SUBST(bfd_backends)
 AC_SUBST(bfd_machines)
+
+verinfo=`cat ${srcdir}/VERINFO`
+IFS="${IFS=	}"; save_ifs="$IFS"; IFS='.'
+set dummy $verinfo
+IFS="$save_ifs"
+
+test -n "$2" && major=$2
+test -n "$3" && minor=$3
+test -n "$4" && patch=$4
+test -n "$5" && extension="$5"
+test -n "$6" && extension="$extension.$6"
+test -n "$7" && extension="$extension.$7"
+
+VERINFO=`expr $major + $minor`:$patch:$minor
+test -n "$extension" && VERINFO=$VERINFO:$extension
+AC_SUBST(VERINFO)
 
 tdefaults=""
 test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
Index: opcodes/Makefile.am
===================================================================
RCS file: /home/work/cvs/gnu/binutils/opcodes/Makefile.am,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Makefile.am
--- opcodes/Makefile.am	1997/10/25 21:56:52	1.1.1.1
+++ opcodes/Makefile.am	1997/12/11 16:01:48
@@ -127,6 +127,8 @@
 
 CLEANFILES = libopcodes.a stamp-lib dep.sed .dep .dep1
 
+libopcodes_la_LDFLAGS = -version-info @VERINFO@
+config.status: $(srcdir)/../bfd/VERINFO
 
 # This dependency stuff is copied from BFD.
 
Index: opcodes/configure.in
===================================================================
RCS file: /home/work/cvs/gnu/binutils/opcodes/configure.in,v
retrieving revision 1.1.1.20
diff -u -r1.1.1.20 configure.in
--- opcodes/configure.in	1997/11/18 17:28:46	1.1.1.20
+++ opcodes/configure.in	1997/12/11 16:15:14
@@ -172,4 +172,20 @@
 AC_SUBST(archdefs)
 AC_SUBST(BFD_MACHINES)
 
+verinfo=`cat ${srcdir}/../bfd/VERINFO`
+IFS="${IFS=	}"; save_ifs="$IFS"; IFS='.'
+set dummy $verinfo
+IFS="$save_ifs"
+
+test -n "$2" && major=$2
+test -n "$3" && minor=$3
+test -n "$4" && patch=$4
+test -n "$5" && extension="$5"
+test -n "$6" && extension="$extension.$6"
+test -n "$7" && extension="$extension.$7"
+
+VERINFO=`expr $major + $minor`:$patch:$minor
+test -n "$extension" && VERINFO=$VERINFO:$extension
+AC_SUBST(VERINFO)
+
 AC_OUTPUT(Makefile)
--- /dev/null	Wed Dec 31 16:00:00 1969
+++ bfd/VERINFO	Thu Dec 11 07:35:19 1997
@@ -0,0 +1 @@
+2.8.1.0.18



More information about the Gas2 mailing list