This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC 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: Tom Tromey <tromey at redhat dot com>, GCJ-patches <java-patches at gcc dot gnu dot org>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 05 Sep 2007 00:11:41 +0200
- Subject: Re: [patch] Encode the libgcj soversion in libjava's private dir
- References: <468CF173.6000800@ubuntu.com> <20070821075039.GD2063@devserv.devel.redhat.com> <46DABE30.5050302@ubuntu.com> <m34piadwem.fsf@fleche.redhat.com> <20070904203640.GD2063@devserv.devel.redhat.com>
Jakub Jelinek schrieb:
> On Tue, Sep 04, 2007 at 02:10:25PM -0600, Tom Tromey wrote:
>>>>>>> "Matthias" == Matthias Klose <doko@ubuntu.com> writes:
>> Matthias> Avoiding this by not passing a make macro to
>> Matthias> ac_configure_args, the attached patch passed a build, check
>> Matthias> and install.
>>
>> Matthias> ok for the trunk?
>>
>> Yes, thanks.
>
> Won't this break installs with e.g.
> make prefix=/var/tmp/root/usr install ? As the native libdir
> no longer contains make variables, it won't be possible to override
> it, and make prefix=something install worked until now for many years.
$srcdir is expressed in terms of '${prefix}', so this should not break; anyway,
I'm testing the attached patch, which avoids passing the additional argument to
classpath, changing the classpath configure instead (there already was a GCJ
local change). currently building/testing/installing. Will check in this patch
if it succeeds.
Matthias
libjava/classpath/
2007-09-04 Matthias Klose <doko@ubuntu.com>
* configure.ac: Append libgcj soversion to nativeexeclibdir.
* configure: Regenerate.
libjava/
2007-09-04 Matthias Klose <doko@ubuntu.com>
* configure.ac: Do not pass --with-native-libdir to classpath.
* configure: Regenerate.
Index: configure.ac
===================================================================
--- configure.ac (revision 128104)
+++ configure.ac (working copy)
@@ -1389,17 +1389,17 @@
# 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 /.
;;
*)
- dbexecdir='$(libdir)/'$multi_os_directory'/gcj-$(gcc_version)'-$libgcj_soversion
+ dbexecdir='$(libdir)/'$multi_os_directory/$gcjsubdir
;;
esac
AC_SUBST(dbexecdir)
-ac_configure_args="$ac_configure_args --with-native-libdir=\$\(toolexeclibdir\)/gcj-$gcjversion-$libgcj_soversion"
AC_DEFINE(JV_VERSION, "1.5.0", [Compatibility version string])
AC_DEFINE(JV_API_VERSION, "1.5", [API compatibility version string])
Index: classpath/configure.ac
===================================================================
--- classpath/configure.ac (revision 128102)
+++ classpath/configure.ac (working copy)
@@ -294,14 +294,14 @@
dnl -----------------------------------------------------------
dnl Sets the native libraries installation dir
dnl -----------------------------------------------------------
-dnl GCJ LOCAL: default to ${toolexeclibdir}/gcj-${gcc_version}
+dnl GCJ LOCAL: default to ${toolexeclibdir}/gcj-${gcc_version}-${libgcj_soversion}
AC_ARG_WITH([native-libdir],
[AS_HELP_STRING(--with-native-libdir,sets the installation directory for native libraries [default='${libdir}/${PACKAGE}'])],
[
nativeexeclibdir=${withval}
],
[
- nativeexeclibdir='${toolexeclibdir}/gcj-'`cat ${srcdir}/../../gcc/BASE-VER`
+ nativeexeclibdir='${toolexeclibdir}/gcj-'`cat ${srcdir}/../../gcc/BASE-VER`-`awk -F: '/^[[^#]].*:/ { print $1 }' ${srcdir}/../libtool-version`
])
AC_SUBST(nativeexeclibdir)