public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Matthias Klose <doko@ubuntu.com>
To: GCJ-patches <java-patches@gcc.gnu.org>
Cc: gcc-patches@gcc.gnu.org
Subject: [patch] Encode the libgcj soversion in libjava's private dir
Date: Thu, 05 Jul 2007 13:26:00 -0000	[thread overview]
Message-ID: <468CF173.6000800@ubuntu.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 682 bytes --]

The following patch encodes the libgcj soversion in the name of the private
libjava subdirectory. Currently a directory gcj-X.Y.Z is used, the patch changes
 that to gcj-X.Y.Z-N. This allows installation of multiple gcj versions within
the same prefix, when the soname changes, but not the gcj version number. This
usually happens, if vendors backport more recent versions of libjava to stable
branches (as seen with Fedora, Debian and Ubuntu). There should not be any
references to the private subdirectory, besides from libjava itself. The patch
is in use without problems in the gcj builds for Debian and Ubuntu, and tested
on i686-linux on the trunk.

Ok for trunk?

  Matthias

[-- Attachment #2: libgcjversion.diff --]
[-- Type: text/plain, Size: 1715 bytes --]

2007-07-05  Matthias Klose  <doko@ubuntu.com>

	* configure.ac: Encode the libgcj soversion in dbexecdir,
	pass --with-native-libdir to classpath configure.
	* configure: Regenerate.

Index: configure.ac
===================================================================
--- configure.ac	(revision 126356)
+++ configure.ac	(working copy)
@@ -1359,25 +1359,27 @@
 AC_SUBST(toolexecmainlibdir)
 AC_SUBST(toolexeclibdir)
 
+# Determine gcj and libgcj version number.
+gcjversion=`$GCJ -v 2>&1 | sed -n 's/^.*version \([[^ ]]*\).*$/\1/p'`
+libgcj_soversion=`awk -F: '/^[[^#]].*:/ { print $1 }' $srcdir/libtool-version`
+GCJVERSION=$gcjversion
+AC_SUBST(GCJVERSION)
+AC_DEFINE_UNQUOTED(GCJVERSION, "$GCJVERSION", [Short GCJ version ID])
+
 # Determine where the standard .db file and GNU Classpath JNI
 # libraries are found.
 multi_os_directory=`$CC -print-multi-os-directory`
 case $multi_os_directory in
   .)
-   dbexecdir='$(libdir)/gcj-$(gcc_version)' # Avoid /.
+   dbexecdir='$(libdir)/gcj-$(gcc_version)'-$libgcj_soversion # Avoid /.
    ;;
   *)
-   dbexecdir='$(libdir)/'$multi_os_directory'/gcj-$(gcc_version)'
+   dbexecdir='$(libdir)/'$multi_os_directory'/gcj-$(gcc_version)'-$libgcj_soversion
    ;;
 esac
 AC_SUBST(dbexecdir)
+ac_configure_args="$ac_configure_args --with-native-libdir=\$\(toolexeclibdir\)/gcj-$gcjversion-$libgcj_soversion"
 
-# Determine gcj version number.
-gcjversion=`$GCJ -v 2>&1 | sed -n 's/^.*version \([[^ ]]*\).*$/\1/p'`
-GCJVERSION=$gcjversion
-AC_SUBST(GCJVERSION)
-AC_DEFINE_UNQUOTED(GCJVERSION, "$GCJVERSION", [Short GCJ version ID])
-
 AC_DEFINE(JV_VERSION, "1.5.0", [Compatibility version string])
 AC_DEFINE(JV_API_VERSION, "1.5", [API compatibility version string])
 

             reply	other threads:[~2007-07-05 13:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-05 13:26 Matthias Klose [this message]
2007-07-05 13:29 ` Andrew Haley
2007-07-28 20:15   ` Tom Tromey
2007-08-21  7:50 ` Jakub Jelinek
2007-09-02 13:44   ` Matthias Klose
2007-09-04 20:31     ` Tom Tromey
2007-09-04 20:36       ` Jakub Jelinek
2007-09-04 22:11         ` Matthias Klose
2007-09-05  2:33         ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=468CF173.6000800@ubuntu.com \
    --to=doko@ubuntu.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=java-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).