This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


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

Re: Update soname


Alexandre Oliva wrote:

> On Feb 21, 2001, Bryce McKinlay <bryce@albatross.co.nz> wrote:
>
> > Where the interface number (starting at "2" to differentiate from the redhat
> > release) gets bumped for each major release when incompatible ABI changes are
> > made, and the "3.0.0" tracks the actual package version.
>
> Yep.  See -version-info and -release in the libtool manual.

I tried this (patch below), but libtool doesn't seem to do the right thing:

$ readelf -d ~/gcc3/lib/libgcj.so

Dynamic segment at offset 0x3ee284 contains 23 entries:
  Tag        Type                         Name/Value
 0x00000001 (NEEDED)                     Shared library: [libpthread.so.0]
 0x00000001 (NEEDED)                     Shared library: [libdl.so.2]
 0x00000001 (NEEDED)                     Shared library: [libgcc_s.so.0]
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]
 0x0000000e (SONAME)                     Library soname: [libgcj-3.0.so.2]
[...]

The "-3.0" is built in to the soname, which is not what we want because this will
mean that every change in the release number breaks compatibility. How can we make
it use "libgcj.so.2" for the soname, and make a libgcj.so.2 -> libgcj-3.0.so
symlink?

regards

  [ bryce ]

Index: configure.in
===================================================================
RCS file: /cvs/gcc/egcs/libjava/configure.in,v
retrieving revision 1.73.2.1
diff -u -r1.73.2.1 configure.in
--- configure.in	2001/02/22 04:22:23	1.73.2.1
+++ configure.in	2001/02/24 04:20:09
@@ -634,9 +634,10 @@
 
 # Determine gcj version number.
 changequote(<<,>>)
-gcjvers="`$GCJ -v 2>&1 | sed -n 's/^.*version \([^ ]*\).*$/\1/p'`"
+GCJVER="`$GCJ --version`"
 changequote([,])
-AC_DEFINE_UNQUOTED(GCJVERSION, "$gcjvers")
+AC_DEFINE_UNQUOTED(GCJVERSION, "$GCJVER")
+AC_SUBST(GCJVER)
 
 AC_SUBST(AM_RUNTESTFLAGS)
 
Index: Makefile.am
===================================================================
RCS file: /cvs/gcc/egcs/libjava/Makefile.am,v
retrieving revision 1.129.2.2
diff -u -r1.129.2.2 Makefile.am
--- Makefile.am	2001/02/22 04:22:22	1.129.2.2
+++ Makefile.am	2001/02/24 04:20:09
@@ -148,6 +148,7 @@
 	$(THREADOBJS) $(THREADLIBS) $(libffi_files) $(LIBLTDL)
 libgcj_la_LDFLAGS = -L$(here)/../libstdc++-v3/libsupc++ -lsupc++ \
 	-rpath $(toolexeclibdir) \
+	-release $(GCJVER) \
 ## The mysterious backslash is consumed by make.
 	-version-info `grep -v '^\#' $(srcdir)/libtool-version`
 libgcj_la_LINK = $(LIBLINK)
Index: libtool-version
===================================================================
RCS file: /cvs/gcc/egcs/libjava/libtool-version,v
retrieving revision 1.2
diff -u -r1.2 libtool-version
--- libtool-version	1999/10/15 06:07:41	1.2
+++ libtool-version	2001/02/24 04:20:09
@@ -3,4 +3,4 @@
 # a separate file so that version updates don't involve re-running
 # automake.
 # CURRENT:REVISION:AGE
-1:0:0
+2:0:0

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