This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [patch] Encode the libgcj soversion in libjava's private dir
- From: Matthias Klose <doko at ubuntu dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: GCJ-patches <java-patches at gcc dot gnu dot org>, gcc-patches at gcc dot gnu dot org
- Date: Sun, 02 Sep 2007 15:44:16 +0200
- Subject: Re: [patch] Encode the libgcj soversion in libjava's private dir
- References: <468CF173.6000800@ubuntu.com> <20070821075039.GD2063@devserv.devel.redhat.com>
Jakub Jelinek schrieb:
> On Thu, Jul 05, 2007 at 03:26:11PM +0200, Matthias Klose wrote:
>> 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.
>
>> 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.
>
> I'm now seeing:
>
> ./config.status: line 405: toolexeclibdir: command not found
> ./config.status: line 695: toolexeclibdir: command not found
>
> While libjava/config.status has:
> ac_configure_args=" ... --with-native-libdir=$\(toolexeclibdir\)/gcj-4.3.0-9 ... "
> which is ok, libjava/classpath/config.status has:
> ac_configure_args=" '--with-native-libdir=$(toolexeclibdir)/gcj-4.3.0-9' "
> which tries to execute toolexeclibdir as a command.
Avoiding this by not passing a make macro to ac_configure_args, the attached
patch passed a build, check and install.
ok for the trunk?
Matthias
2007-09-02 Matthias Klose <doko@ubuntu.com>
* configure.ac: Robustify passing of --with-native-libdir to classpath.
* configure: Regenerate.
2007-09-02 Matthias Klose <doko@ubuntu.com>
* configure.ac: Robustify passing of --with-native-libdir to classpath.
* configure: Regenerate.
Index: configure.ac
===================================================================
--- configure.ac (revision 128023)
+++ configure.ac (working copy)
@@ -1377,17 +1377,20 @@
# Determine where the standard .db file and GNU Classpath JNI
# libraries are found.
+gcjsubdir=gcj-$gcjversion-$libgcj_soversion
multi_os_directory=`$CC -print-multi-os-directory`
case $multi_os_directory in
.)
- dbexecdir='$(libdir)/gcj-$(gcc_version)'-$libgcj_soversion # Avoid /.
+ dbexecdir='$(libdir)/'$gcjsubdir # Avoid /.
+ nativelibdir="$libdir/$gcjsubdir"
;;
*)
- dbexecdir='$(libdir)/'$multi_os_directory'/gcj-$(gcc_version)'-$libgcj_soversion
+ dbexecdir='$(libdir)/'$multi_os_directory/$gcjsubdir
+ nativelibdir="$libdir/$multi_os_directory/$gcjsubdir"
;;
esac
AC_SUBST(dbexecdir)
-ac_configure_args="$ac_configure_args --with-native-libdir=\$\(toolexeclibdir\)/gcj-$gcjversion-$libgcj_soversion"
+ac_configure_args="$ac_configure_args --with-native-libdir=$nativelibdir"
AC_DEFINE(JV_VERSION, "1.5.0", [Compatibility version string])
AC_DEFINE(JV_API_VERSION, "1.5", [API compatibility version string])