public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Sandra Loosemore <sandra@codesourcery.com>
To: Andrew Haley <aph@redhat.com>
Cc: <java-patches@gcc.gnu.org>
Subject: Re: [ping**2] libjava cross-compilation patches
Date: Wed, 22 May 2013 21:34:00 -0000	[thread overview]
Message-ID: <519D39CC.6060702@codesourcery.com> (raw)
In-Reply-To: <519A81AE.50401@codesourcery.com>

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

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


[-- Attachment #2: libjava.log --]
[-- Type: text/x-log, Size: 2130 bytes --]

2013-05-22  Mark Mitchell  <mark@codesourcery.com>
	    Sandra Loosemore  <sandra@codesourcery.com>

	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.

[-- Attachment #3: libjava.patch --]
[-- Type: text/x-patch, Size: 4125 bytes --]

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)
 ])
 

      reply	other threads:[~2013-05-22 21:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-20 19:18 Sandra Loosemore
2013-05-20 19:27 ` Andrew Haley
2013-05-20 20:04   ` Sandra Loosemore
2013-05-22 21:34     ` Sandra Loosemore [this message]

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=519D39CC.6060702@codesourcery.com \
    --to=sandra@codesourcery.com \
    --cc=aph@redhat.com \
    --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).