From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23783 invoked by alias); 22 May 2013 21:34:17 -0000 Mailing-List: contact java-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-patches-owner@gcc.gnu.org Received: (qmail 23774 invoked by uid 89); 22 May 2013 21:34:17 -0000 X-Spam-SWARE-Status: No, score=-4.0 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,TW_GC,TW_IB,TW_KG autolearn=ham version=3.3.1 Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 22 May 2013 21:34:15 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1UfGfj-00004X-Or from Sandra_Loosemore@mentor.com ; Wed, 22 May 2013 14:34:11 -0700 Received: from SVR-ORW-FEM-03.mgc.mentorg.com ([147.34.97.39]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 22 May 2013 14:34:11 -0700 Received: from [IPv6:::1] (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.2.247.3; Wed, 22 May 2013 14:34:10 -0700 Message-ID: <519D39CC.6060702@codesourcery.com> Date: Wed, 22 May 2013 21:34:00 -0000 From: Sandra Loosemore User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: Andrew Haley CC: Subject: Re: [ping**2] libjava cross-compilation patches References: <519A76EF.40701@codesourcery.com> <519A7927.3050704@redhat.com> <519A81AE.50401@codesourcery.com> In-Reply-To: <519A81AE.50401@codesourcery.com> Content-Type: multipart/mixed; boundary="------------090002080500040500010407" X-Virus-Found: No X-SW-Source: 2013-q2/txt/msg00051.txt.bz2 --------------090002080500040500010407 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Content-length: 1180 On 05/20/2013 02:03 PM, Sandra Loosemore wrote: > On 05/20/2013 01:27 PM, Andrew Haley wrote: >> On 05/20/2013 08:18 PM, Sandra Loosemore wrote: >>> We've been trying to get this set of configuration patches to support >>> cross-compilation of libjava approved since 2009; most recently I pinged >>> them last July. Can somebody please review them? >> >> I'm sorry. They look OK to me; please commit. >> >> I presume that you have re-checked them with the testsuite and the >> current >> sources. If you have any test failures please let us know. > > I actually have not done that yet, but I will do so before committing > anything. I was hesitant to spend a lot of time on refreshing the > patches given the previous lack of interest in them. :-P For the record, here is what I checked in (minus all the auto-generated bits). I did a cross build to powerpc-linux-gnu and verified that it's no longer dropping target-specific/multilib-specific things in lib/ and that the pieces fixed by this patch appear in a more reasonable place. It doesn't look like libjava supports remote installed-tree testing yet but I did regression-test on x86_64 native instead. -Sandra --------------090002080500040500010407 Content-Type: text/x-log; name="libjava.log" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="libjava.log" Content-length: 2130 2013-05-22 Mark Mitchell Sandra Loosemore libjava/ * configure.ac (dbexecdir): Base on $(toolexeclibdir), not $(libdir). * Makefile.am (pkgconfigdir): Likewise. * configure: Regenerated. * Makefile.in: Regenerated. * gcj/Makefile.in: Regenerated. * include/Makefile.in: Regenerated. * testsuite/Makefile.in: Regenerated. libjava/classpath/ * configure.ac: Define host_noncanonical and target_noncanonical. Support --enable-version-specific-runtime-libs. * m4/acinclude.m4 (CLASSPATH_TOOLEXECLIBDIR): Match libjava definition of toolexeclibdir. * configure: Regenerated. * Makefile.in: Regenerated. * doc/api/Makefile.in: Regenerated. * doc/Makefile.in: Regenerated. * examples/Makefile.in: Regenerated. * external/jsr166/Makefile.in: Regenerated. * external/Makefile.in: Regenerated. * external/relaxngDatatype/Makefile.in: Regenerated. * external/sax/Makefile.in: Regenerated. * external/w3c_dom/Makefile.in: Regenerated. * include/Makefile.in: Regenerated. * lib/Makefile.in: Regenerated. * native/fdlibm/Makefile.in: Regenerated. * native/jawt/Makefile.in: Regenerated. * native/jni/Makefile.in: Regenerated. * native/jni/gconf-peer/Makefile.in: Regenerated. * native/jni/gstreamer-peer/Makefile.in: Regenerated. * native/jni/gtk-peer/Makefile.in: Regenerated. * native/jni/java-io/Makefile.in: Regenerated. * native/jni/java-lang/Makefile.in: Regenerated. * native/jni/java-math/Makefile.in: Regenerated. * native/jni/java-net/Makefile.in: Regenerated. * native/jni/java-nio/Makefile.in: Regenerated. * native/jni/java-util/Makefile.in: Regenerated. * native/jni/Makefile.in: Regenerated. * native/jni/midi-alsa/Makefile.in: Regenerated. * native/jni/midi-dssi/Makefile.in: Regenerated. * native/jni/native-lib/Makefile.in: Regenerated. * native/jni/qt-peer/Makefile.in: Regenerated. * native/jni/xmlj/Makefile.in: Regenerated. * native/Makefile.in: Regenerated. * native/plugin/Makefile.in: Regenerated. * resource/Makefile.in: Regenerated. * scripts/Makefile.in: Regenerated. * tools/Makefile.in: Regenerated. --------------090002080500040500010407 Content-Type: text/x-patch; name="libjava.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="libjava.patch" Content-length: 4125 Index: libjava/configure.ac =================================================================== --- libjava/configure.ac (revision 199219) +++ libjava/configure.ac (working copy) @@ -1599,10 +1599,10 @@ gcjsubdir=gcj-$gcjversion-$libgcj_sovers multi_os_directory=`$CC -print-multi-os-directory` case $multi_os_directory in .) - dbexecdir='$(libdir)/'$gcjsubdir # Avoid /. + dbexecdir='$(toolexeclibdir)/'$gcjsubdir # Avoid /. ;; *) - dbexecdir='$(libdir)/'$multi_os_directory/$gcjsubdir + dbexecdir='$(toolexeclibdir)/'$multi_os_directory/$gcjsubdir ;; esac AC_SUBST(dbexecdir) Index: libjava/Makefile.am =================================================================== --- libjava/Makefile.am (revision 199219) +++ libjava/Makefile.am (working copy) @@ -221,7 +221,7 @@ endif dbexec_LTLIBRARIES = libjvm.la -pkgconfigdir = $(libdir)/pkgconfig +pkgconfigdir = $(toolexeclibdir)/pkgconfig jardir = $(datadir)/java jar_DATA = libgcj-$(gcc_version).jar libgcj-tools-$(gcc_version).jar Index: libjava/classpath/configure.ac =================================================================== --- libjava/classpath/configure.ac (revision 199219) +++ libjava/classpath/configure.ac (working copy) @@ -317,6 +317,26 @@ dnl defined to the same value for all mu dnl so that we can refer to the multilib installation directories from dnl classpath's build files. dnl ----------------------------------------------------------- +case ${host_alias} in + "") host_noncanonical=${build_noncanonical} ;; + *) host_noncanonical=${host_alias} ;; +esac +case ${target_alias} in + "") target_noncanonical=${host_noncanonical} ;; + *) target_noncanonical=${target_alias} ;; +esac +AC_SUBST(target_noncanonical) + +AC_ARG_ENABLE(version-specific-runtime-libs, + AS_HELP_STRING([--enable-version-specific-runtime-libs], + [specify that runtime libraries should be installed in a compiler-specific directory]), + [case "$enableval" in + yes) version_specific_libs=yes ;; + no) version_specific_libs=no ;; + *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);; + esac], + [version_specific_libs=no] +) CLASSPATH_TOOLEXECLIBDIR dnl ----------------------------------------------------------- Index: libjava/classpath/m4/acinclude.m4 =================================================================== --- libjava/classpath/m4/acinclude.m4 (revision 199219) +++ libjava/classpath/m4/acinclude.m4 (working copy) @@ -249,11 +249,35 @@ dnl GCJ LOCAL: Calculate toolexeclibdir dnl ----------------------------------------------------------- AC_DEFUN([CLASSPATH_TOOLEXECLIBDIR], [ - multi_os_directory=`$CC -print-multi-os-directory` - case $multi_os_directory in - .) toolexeclibdir=${libdir} ;; # Avoid trailing /. - *) toolexeclibdir=${libdir}/${multi_os_directory} ;; + case ${version_specific_libs} in + yes) + # Need the gcc compiler version to know where to install libraries + # and header files if --enable-version-specific-runtime-libs option + # is selected. + includedir='$(libdir)/gcc/$(target_noncanonical)/$(gcc_version)/include/' + toolexecdir='$(libdir)/gcc/$(target_noncanonical)' + toolexecmainlibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)' + toolexeclibdir=$toolexecmainlibdir + ;; + no) + if test -n "$with_cross_host" && + test x"$with_cross_host" != x"no"; then + # Install a library built with a cross compiler in tooldir, not libdir. + toolexecdir='$(exec_prefix)/$(target_noncanonical)' + toolexecmainlibdir='$(toolexecdir)/lib' + else + toolexecdir='$(libdir)/gcc-lib/$(target_noncanonical)' + toolexecmainlibdir='$(libdir)' + fi + multi_os_directory=`$CC -print-multi-os-directory` + case $multi_os_directory in + .) toolexeclibdir=$toolexecmainlibdir ;; # Avoid trailing /. + *) toolexeclibdir=$toolexecmainlibdir/$multi_os_directory ;; + esac + ;; esac + AC_SUBST(toolexecdir) + AC_SUBST(toolexecmainlibdir) AC_SUBST(toolexeclibdir) ]) --------------090002080500040500010407--