public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Toplevel cleanup: split out libgcj disabling
@ 2011-04-27 15:50 Joseph S. Myers
  2011-04-27 16:34 ` Toplevel cleanup: disable Java when libffi not supported Joseph S. Myers
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Joseph S. Myers @ 2011-04-27 15:50 UTC (permalink / raw)
  To: gcc-patches; +Cc: java-patches, bonzini, dj, neroden, aoliva, Ralf.Wildenhues

Continuing the toplevel cleanups separating the cases disabling
different subdirectories - on the basis that eventually this
information should come from the subdirectories, and that as
previously discussed much of the default disabling of ${libgcj}
doesn't actually make sense - this patch separates the
Java-and-${libgcj}-disabling cases out from the rest of the
directory-disabling cases.

This patch deliberately keeps the case structure the same to make it
clear it does not change the set of disabled directories at all - thus
there are now empty cases in both the old and the new case statements.
These are intended to be cleaned up in subsequent patches.  (Removing
an empty case is not automatically obvious, since it may cause a later
case such as *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu |
*-*-kopensolaris*-gnu or *-*-* to be active instead.  In many cases
they can be removed, because the combination that would activate the
other case is not meaningful or because it doesn't matter what the
Java configuration is for targets that have been removed from or never
supported in GCC - but I prefer to keep such removals separate.)

OK to commit?

2011-04-27  Joseph Myers  <joseph@codesourcery.com>

	* configure.ac: Separate cases disabling Java and Java libraries
	from general case over targets.
	* configure: Regenerate.

Index: configure.ac
===================================================================
--- configure.ac	(revision 173034)
+++ configure.ac	(working copy)
@@ -558,6 +558,301 @@
     ;;
 esac
 
+# Disable Java, libgcj or related libraries for some systems.
+case "${target}" in
+  *-*-chorusos)
+    ;;
+  powerpc-*-darwin*)
+    ;;
+  i[[3456789]]86-*-darwin*)
+    ;;
+  x86_64-*-darwin[[912]]*)
+    ;;
+  *-*-darwin*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  *-*-dragonfly*)
+    ;;
+  *-*-freebsd*)
+    # Skip some stuff that's unsupported on some FreeBSD configurations.
+    case "${target}" in
+      i*86-*-*) ;;
+      alpha*-*-*) ;;
+      x86_64-*-*) ;;
+      *)
+	noconfigdirs="$noconfigdirs ${libgcj}"
+	;;
+    esac
+    ;;
+  *-*-kaos*)
+    ;;
+  *-*-netbsd*)
+    # Skip some stuff that's unsupported on some NetBSD configurations.
+    case "${target}" in
+      i*86-*-netbsdelf*) ;;
+      arm*-*-netbsdelf*) ;;
+      *)
+	noconfigdirs="$noconfigdirs ${libgcj}"
+	;;
+    esac
+    ;;
+  *-*-netware*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  *-*-rtems*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  *-*-tpf*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  *-*-uclinux*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  *-*-vxworks*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  alpha*-dec-osf*)
+    ;;
+  alpha*-*-*vms*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  alpha*-*-linux*)
+    ;;
+  alpha*-*-*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  am33_2.0-*-linux*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  sh-*-linux*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;    
+  sh*-*-pe|mips*-*-pe|*arm-wince-pe)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  arc-*-*)
+    ;;
+  arm-*-coff)
+    ;;
+  arm-*-elf* | arm*-*-eabi* )
+    noconfigdirs="$noconfigdirs target-libffi"
+    ;;
+  arm*-*-linux-gnueabi)
+    ;;
+  arm*-*-symbianelf*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  arm-*-pe*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  arm-*-riscix*)
+    ;;
+  avr-*-*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  bfin-*-*)
+    unsupported_languages="$unsupported_languages java"
+    noconfigdirs="$noconfigdirs target-boehm-gc"
+    ;;
+  c4x-*-* | tic4x-*-*)
+    ;;
+  tic54x-*-*)
+    ;;
+  cr16-*-*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  cris-*-* | crisv32-*-*)
+    unsupported_languages="$unsupported_languages java"
+    case "${target}" in
+      *-*-linux*)
+	;;
+      *) # See PR46792 regarding target-libffi.
+	noconfigdirs="$noconfigdirs target-libffi target-boehm-gc";;
+    esac
+    ;;
+  d10v-*-*)
+    ;;
+  d30v-*-*)
+    ;;
+  fr30-*-elf*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  frv-*-*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  moxie-*-*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  h8300*-*-*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  h8500-*-*)
+    ;;
+  hppa1.1-*-osf* | hppa1.1-*-bsd* )
+    ;;
+  hppa*64*-*-linux*)
+    # In this case, it's because the hppa64-linux target is for
+    # the kernel only at this point and has no libc, and thus no
+    # headers, crt*.o, etc., all of which are needed by these.
+    noconfigdirs="$noconfigdirs target-zlib"
+    ;;
+  hppa*-*-linux*)
+    ;;
+  hppa*-*-*elf* | \
+  hppa*-*-lites* | \
+  hppa*-*-openbsd* | \
+  hppa*64*-*-*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  hppa*-hp-hpux11*)
+    ;;
+  hppa*-*-pro*)
+    ;;
+  hppa*-*-*)
+    # According to Alexandre Oliva <aoliva@redhat.com>, libjava won't
+    # build on HP-UX 10.20.
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  i960-*-*)
+    ;;
+  ia64*-*-elf*)
+    ;;
+  ia64*-**-hpux*)
+    ;;
+  ia64*-*-*vms*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  i[[3456789]]86-*-coff | i[[3456789]]86-*-elf)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  i[[3456789]]86-*-linux*)
+    ;;
+  i[[3456789]]86-w64-mingw*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  i[[3456789]]86-*-mingw*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  x86_64-*-mingw*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  *-*-cygwin*)
+    ;;
+  i[[3456789]]86-*-interix* )
+    ;;
+  i[[3456789]]86-*-pe)
+    ;;
+  i[[3456789]]86-*-sco3.2v5*)
+    ;;
+  i[[3456789]]86-*-sco*)
+    ;;
+  i[[3456789]]86-*-solaris2*)
+    ;;
+  i[[3456789]]86-*-sysv4*)
+    ;;
+  i[[3456789]]86-*-beos*)
+    ;;
+  i[[3456789]]86-*-rdos*)
+    ;;
+  m32r-*-*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
+    ;;
+  m68k-*-elf*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  m68*-*-* | fido-*-*)
+    ;;
+  mmix-*-*)
+    noconfigdirs="$noconfigdirs target-libffi target-boehm-gc"
+    unsupported_languages="$unsupported_languages java"
+    ;;
+  mt-*-*)
+    ;;
+  powerpc-*-aix*)
+    # copied from rs6000-*-* entry
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  powerpc*-*-winnt* | powerpc*-*-pe*)
+    ;;
+  powerpcle-*-solaris*)
+    ;;
+  powerpc-*-beos*)
+    ;;
+  powerpc-*-eabi)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  powerpc-*-eabi* | powerpcle-*-eabi* | powerpc-*-rtems* )
+    ;;
+  rs6000-*-lynxos*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  rs6000-*-aix*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  rs6000-*-*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  m68k-apollo-*)
+    ;;
+  microblaze*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  mips*-sde-elf*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  mips*-*-irix5*)
+    ;;
+  mips*-*-irix6*)
+    # Linking libjava exceeds command-line length limits on at least
+    # IRIX 6.2, but not on IRIX 6.5.
+    # Also, boehm-gc won't build on IRIX 6.5, according to Jeffrey Oldham
+    # <oldham@codesourcery.com>
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  mips*-*-bsd*)
+    ;;
+  mips*-*-linux*)
+    ;;
+  mips*-*-*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  sh-*-* | sh64-*-*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  sparclet-*-aout* | sparc86x-*-*)
+    ;;
+  sparc-*-elf*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  sparc64-*-elf*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  sparclite-*-*)
+    ;;
+  sparc-*-sunos4*)
+    ;;
+  sparc-*-solaris* | sparc64-*-solaris* | sparcv9-*-solaris*)
+    ;;
+  tic6x-*-*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  v810-*-*)
+    ;;
+  vax-*-*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+  *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
+    ;;
+  *-*-lynxos*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;; 
+  *-*-*)
+    noconfigdirs="$noconfigdirs ${libgcj}"
+    ;;
+esac
+
 # Default libgloss CPU subdirectory.
 libgloss_dir="$target_cpu"
 
@@ -580,7 +875,6 @@
   *-*-darwin*)
     noconfigdirs="$noconfigdirs ld gas gdb gprof"
     noconfigdirs="$noconfigdirs sim target-rda"
-    noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
   *-*-dragonfly*)
     noconfigdirs="$noconfigdirs target-newlib target-libgloss"
@@ -591,16 +885,6 @@
 	&& test -f /usr/local/include/gmp.h; then
       with_gmp=/usr/local
     fi
-
-    # Skip some stuff that's unsupported on some FreeBSD configurations.
-    case "${target}" in
-      i*86-*-*) ;;
-      alpha*-*-*) ;;
-      x86_64-*-*) ;;
-      *)
-	noconfigdirs="$noconfigdirs ${libgcj}"
-	;;
-    esac
     ;;
   *-*-kaos*)
     # Remove unsupported stuff on all kaOS configurations.
@@ -609,31 +893,22 @@
   *-*-netbsd*)
     # Skip some stuff on all NetBSD configurations.
     noconfigdirs="$noconfigdirs target-newlib target-libgloss"
-
-    # Skip some stuff that's unsupported on some NetBSD configurations.
-    case "${target}" in
-      i*86-*-netbsdelf*) ;;
-      arm*-*-netbsdelf*) ;;
-      *)
-	noconfigdirs="$noconfigdirs ${libgcj}"
-	;;
-    esac
     ;;
   *-*-netware*)
-    noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
+    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
     ;;
   *-*-rtems*)
-    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libgloss"
     ;;
     # The tpf target doesn't support gdb yet.
   *-*-tpf*)
-    noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj} gdb tcl tk libgui itcl"
+    noconfigdirs="$noconfigdirs target-newlib target-libgloss gdb tcl tk libgui itcl"
     ;;
   *-*-uclinux*)
-    noconfigdirs="$noconfigdirs target-newlib target-libgloss target-rda ${libgcj}"
+    noconfigdirs="$noconfigdirs target-newlib target-libgloss target-rda"
     ;;
   *-*-vxworks*)
-    noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
+    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
     ;;
   alpha*-dec-osf*)
     # ld works, but does not support shared libraries.
@@ -642,7 +917,7 @@
     noconfigdirs="$noconfigdirs gas ld target-newlib target-libgloss"
     ;;
   alpha*-*-*vms*)
-    noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
+    noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
     ;;
   alpha*-*-linux*)
     # newlib is not 64 bit ready
@@ -650,16 +925,15 @@
     ;;
   alpha*-*-*)
     # newlib is not 64 bit ready
-    noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
+    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
     ;;
   am33_2.0-*-linux*)
-    noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
+    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
     ;;
   sh-*-linux*)
-    noconfigdirs="$noconfigdirs ${libgcj} target-newlib target-libgloss"
+    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
     ;;    
   sh*-*-pe|mips*-*-pe|*arm-wince-pe)
-    noconfigdirs="$noconfigdirs ${libgcj}"
     noconfigdirs="$noconfigdirs tcl tk itcl libgui sim"
     noconfigdirs="$noconfigdirs target-newlib"
     libgloss_dir=wince
@@ -671,7 +945,6 @@
     libgloss_dir=arm
     ;;
   arm-*-elf* | arm*-*-eabi* )
-    noconfigdirs="$noconfigdirs target-libffi"
     libgloss_dir=arm
     ;;
   arm*-*-linux-gnueabi)
@@ -681,21 +954,17 @@
     libgloss_dir=arm
     ;;
   arm*-*-symbianelf*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
     libgloss_dir=arm
     ;;
   arm-*-pe*)
-    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libgloss"
     ;;
   arm-*-riscix*)
     noconfigdirs="$noconfigdirs ld target-libgloss"
     ;;
   avr-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
   bfin-*-*)
-    unsupported_languages="$unsupported_languages java"
-    noconfigdirs="$noconfigdirs target-boehm-gc"
     ;;
   c4x-*-* | tic4x-*-*)
     noconfigdirs="$noconfigdirs target-libgloss"
@@ -704,15 +973,12 @@
     noconfigdirs="$noconfigdirs target-libgloss gdb"
     ;;
   cr16-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj} gdb"
+    noconfigdirs="$noconfigdirs gdb"
     ;;
   cris-*-* | crisv32-*-*)
-    unsupported_languages="$unsupported_languages java"
     case "${target}" in
       *-*-linux*)
 	noconfigdirs="$noconfigdirs target-newlib target-libgloss";;
-      *) # See PR46792 regarding target-libffi.
-	noconfigdirs="$noconfigdirs target-libffi target-boehm-gc";;
     esac
     libgloss_dir=cris
     ;;
@@ -723,17 +989,15 @@
     noconfigdirs="$noconfigdirs gdb"
     ;;
   fr30-*-elf*)
-    noconfigdirs="$noconfigdirs ${libgcj} gdb"
+    noconfigdirs="$noconfigdirs gdb"
     ;;
   frv-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
   moxie-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
     noconfigdirs="$noconfigdirs gprof"
     ;;
   h8300*-*-*)
-    noconfigdirs="$noconfigdirs target-libgloss ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libgloss"
     ;;
   h8500-*-*)
     noconfigdirs="$noconfigdirs target-libgloss"
@@ -741,10 +1005,6 @@
   hppa1.1-*-osf* | hppa1.1-*-bsd* )
     ;;
   hppa*64*-*-linux*)
-    # In this case, it's because the hppa64-linux target is for
-    # the kernel only at this point and has no libc, and thus no
-    # headers, crt*.o, etc., all of which are needed by these.
-    noconfigdirs="$noconfigdirs target-zlib"
     ;;
   hppa*-*-linux*)
     ;;
@@ -752,7 +1012,6 @@
   hppa*-*-lites* | \
   hppa*-*-openbsd* | \
   hppa*64*-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
   hppa*-hp-hpux11*)
     noconfigdirs="$noconfigdirs ld"
@@ -761,9 +1020,7 @@
     libgloss_dir=pa
     ;;
   hppa*-*-*)
-    # According to Alexandre Oliva <aoliva@redhat.com>, libjava won't
-    # build on HP-UX 10.20.
-    noconfigdirs="$noconfigdirs ld ${libgcj}"
+    noconfigdirs="$noconfigdirs ld"
     ;;
   i960-*-*)
     noconfigdirs="$noconfigdirs gdb"
@@ -774,14 +1031,13 @@
     ;;
   ia64*-**-hpux*)
     # No ld support yet.
-    noconfigdirs="$noconfigdirs ${libgcj} libgui itcl ld"
+    noconfigdirs="$noconfigdirs libgui itcl ld"
     ;;
   ia64*-*-*vms*)
     # No gdb or ld support yet.
-    noconfigdirs="$noconfigdirs ${libgcj} readline libgui itcl gdb ld"
+    noconfigdirs="$noconfigdirs readline libgui itcl gdb ld"
     ;;
   i[[3456789]]86-*-coff | i[[3456789]]86-*-elf)
-    noconfigdirs="$noconfigdirs ${libgcj}"
     libgloss_dir=i386
     ;;
   i[[3456789]]86-*-linux*)
@@ -797,14 +1053,14 @@
     # 'target-newlib' will appear in skipdirs.
     ;;
   i[[3456789]]86-w64-mingw*)
-    noconfigdirs="$noconfigdirs target-libgloss target-newlib ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libgloss target-newlib"
     ;;
   i[[3456789]]86-*-mingw*)
     target_configdirs="$target_configdirs target-winsup"
-    noconfigdirs="$noconfigdirs target-libgloss target-newlib ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libgloss target-newlib"
     ;;
   x86_64-*-mingw*)
-    noconfigdirs="$noconfigdirs target-libgloss target-newlib ${libgcj}"
+    noconfigdirs="$noconfigdirs target-libgloss target-newlib"
     ;;
   *-*-cygwin*)
     target_configdirs="$target_configdirs target-libtermcap target-winsup"
@@ -842,27 +1098,24 @@
     noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
     ;;
   m32r-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
   m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
     libgloss_dir=m68hc11
     ;;
   m68k-*-elf*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
   m68*-*-* | fido-*-*)
     libgloss_dir=m68k
     ;;
   mmix-*-*)
-    noconfigdirs="$noconfigdirs target-libffi target-boehm-gc gdb"
-    unsupported_languages="$unsupported_languages java"
+    noconfigdirs="$noconfigdirs gdb"
     ;;
   mt-*-*)
     noconfigdirs="$noconfigdirs sim"
     ;;
   powerpc-*-aix*)
     # copied from rs6000-*-* entry
-    noconfigdirs="$noconfigdirs gprof target-libgloss target-newlib ${libgcj}"
+    noconfigdirs="$noconfigdirs gprof target-libgloss target-newlib"
     ;;
   powerpc*-*-winnt* | powerpc*-*-pe*)
     target_configdirs="$target_configdirs target-winsup"
@@ -879,29 +1132,27 @@
     noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
     ;;
   powerpc-*-eabi)
-    noconfigdirs="$noconfigdirs ${libgcj}"
     libgloss_dir=rs6000
     ;;
   powerpc-*-eabi* | powerpcle-*-eabi* | powerpc-*-rtems* )
     libgloss_dir=rs6000
     ;;
   rs6000-*-lynxos*)
-    noconfigdirs="$noconfigdirs target-newlib gprof ${libgcj}"
+    noconfigdirs="$noconfigdirs target-newlib gprof"
     ;;
   rs6000-*-aix*)
-    noconfigdirs="$noconfigdirs gprof target-libgloss target-newlib ${libgcj}"
+    noconfigdirs="$noconfigdirs gprof target-libgloss target-newlib"
     ;;
   rs6000-*-*)
-    noconfigdirs="$noconfigdirs gprof ${libgcj}"
+    noconfigdirs="$noconfigdirs gprof"
     ;;
   m68k-apollo-*)
     noconfigdirs="$noconfigdirs ld binutils gprof target-libgloss"
     ;;
   microblaze*)
-    noconfigdirs="$noconfigdirs gprof ${libgcj}"
+    noconfigdirs="$noconfigdirs gprof"
     ;;
   mips*-sde-elf*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
     if test x$with_newlib = xyes; then
       noconfigdirs="$noconfigdirs gprof"
     fi
@@ -911,11 +1162,7 @@
     noconfigdirs="$noconfigdirs gprof target-libgloss"
     ;;
   mips*-*-irix6*)
-    # Linking libjava exceeds command-line length limits on at least
-    # IRIX 6.2, but not on IRIX 6.5.
-    # Also, boehm-gc won't build on IRIX 6.5, according to Jeffrey Oldham
-    # <oldham@codesourcery.com>
-    noconfigdirs="$noconfigdirs gprof target-libgloss ${libgcj}"
+    noconfigdirs="$noconfigdirs gprof target-libgloss"
     ;;
   mips*-*-bsd*)
     noconfigdirs="$noconfigdirs gprof target-libgloss"
@@ -924,25 +1171,23 @@
     noconfigdirs="$noconfigdirs target-newlib target-libgloss"
     ;;
   mips*-*-*)
-    noconfigdirs="$noconfigdirs gprof ${libgcj}"
+    noconfigdirs="$noconfigdirs gprof"
     libgloss_dir=mips
     ;;
   sh-*-* | sh64-*-*)
     case "${target}" in
       sh*-*-elf)
-         noconfigdirs="$noconfigdirs ${libgcj}" ;;
+         ;;
       *)
-         noconfigdirs="$noconfigdirs target-libgloss ${libgcj}" ;;
+         noconfigdirs="$noconfigdirs target-libgloss" ;;
     esac
     ;;
   sparclet-*-aout* | sparc86x-*-*)
     libgloss_dir=sparc
     ;;
   sparc-*-elf*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
   sparc64-*-elf*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
     libgloss_dir=sparc
     ;;
   sparclite-*-*)
@@ -958,22 +1203,21 @@
   sparc-*-solaris* | sparc64-*-solaris* | sparcv9-*-solaris*)
     ;;
   tic6x-*-*)
-    noconfigdirs="$noconfigdirs gdb sim ${libgcj}"
+    noconfigdirs="$noconfigdirs gdb sim"
     ;;
   v810-*-*)
     noconfigdirs="$noconfigdirs bfd binutils gas gdb ld opcodes target-libgloss"
     ;;
   vax-*-*)
-    noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
+    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
     ;;
   *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
     noconfigdirs="$noconfigdirs target-newlib target-libgloss"
     ;;
   *-*-lynxos*)
-    noconfigdirs="$noconfigdirs target-newlib target-libgloss ${libgcj}"
+    noconfigdirs="$noconfigdirs target-newlib target-libgloss"
     ;; 
   *-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
 esac
 

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Toplevel cleanup: disable Java when libffi not supported
  2011-04-27 15:50 Toplevel cleanup: split out libgcj disabling Joseph S. Myers
@ 2011-04-27 16:34 ` Joseph S. Myers
  2011-04-27 16:38   ` Andrew Haley
                     ` (3 more replies)
  2011-04-27 17:31 ` Toplevel cleanup: split out libgcj disabling Mike Stump
  2011-04-28  6:31 ` Paolo Bonzini
  2 siblings, 4 replies; 12+ messages in thread
From: Joseph S. Myers @ 2011-04-27 16:34 UTC (permalink / raw)
  To: gcc-patches
  Cc: java-patches, bonzini, dj, neroden, aoliva, Ralf.Wildenhues, green

This patch, relative to a tree with
<http://gcc.gnu.org/ml/gcc-patches/2011-04/msg02123.html> applied,
continues the cleanup of toplevel cases relating to disabling Java or
Java libraries by arranging for Java to be disabled (via
unsupported_languages) on targets not supporting libffi, and removing
many cases in the Java-disabling case statement that are no longer
needed, either because they relate to targets not supporting libffi or
because they relate to targets no longer supported in GCC so it
doesn't matter what the Java configuration is for them.

The ideal would be for information about libffi-supported targets to
come from a configure fragment in the libffi/ directory, as per item 4
in <http://gcc.gnu.org/ml/gcc/2011-03/msg00486.html>.  Given that at
present there is some divergence between the libffi repository and the
GCC copy of libffi, however, now may not be the best time to add such
a fragment in GCC; instead, I put a minimal case statement (covering
only targets supported by both libffi and GCC) at toplevel.

Where Java-disabling-related cases did more than just disabling Java
or ${libgcj} (for example, explicitly disabling target-boehm-gc or
target-libffi) I left them in for now even if not strictly needed with
the separate libffi case statement.

This patch is intended to be safe, in that the only way it should
change behavior for targets supported by GCC is to disable Java in
some cases where the libraries would not build because of lack of
libffi support (whether or not the libraries and front end were
previously enabled in such cases).

OK to commit?

2011-04-27  Joseph Myers  <joseph@codesourcery.com>

	* configure.ac: Disable Java for targets not supporting libffi.
	(*-*-kaos*, am33_2.0-*-linux*, sh*-*-pe|mips*-*-pe): Remove cases
	in Java-disabling statement.
	(*arm-wince-pe): Change to arm-wince-pe.
	(arc-*-*, arm-*-coff, arm-*-pe*, arm-*-riscix*, avr-*-*): Remove
	cases in Java-disabling statement.
	(bfin-*-*): Don't disable Java again.
	(c4x-*-* | tic4x-*-*, tic54x-*-*, cr16-*-*, d10v-*-*, d30v-*-*,
	fr30-*-elf*, moxie-*-*, h8300*-*-*, h8500-*-*, hppa1.1-*-osf* |
	hppa1.1-*-bsd*, hppa*-*-*elf* | hppa*-*-lites* | hppa*-*-openbsd*,
	hppa*-*-pro*, i960-*-*, i[[3456789]]86-*-coff,
	i[[3456789]]86-*-pe, i[[3456789]]86-*-sco3.2v5*,
	i[[3456789]]86-*-sco*, i[[3456789]]86-*-sysv4*,
	i[[3456789]]86-*-beos*, i[[3456789]]86-*-rdos*,
	m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*): Remove cases in
	Java-disabling statement.
	(mmix-*-*): Don't disable Java again.
	(mt-*-*, powerpc*-*-winnt* | powerpc*-*-pe*, powerpcle-*-solaris*,
	powerpc-*-beos*, rs6000-*-lynxos*, rs6000-*-*, m68k-apollo-*,
	microblaze*, mips*-sde-elf*, mips*-*-irix5*, mips*-*-bsd*,
	sparclet-*-aout* | sparc86x-*-*, sparclite-*-*, sparc-*-sunos4*,
	tic6x-*-*, v810-*-*, vax-*-*): Remove cases in Java-disabling
	statement.
	* configure: Regenerate.

--- configure.ac	2011-04-27 15:22:59.000000000 +0000
+++ configure.ac.new	2011-04-27 16:12:46.000000000 +0000
@@ -558,10 +558,61 @@
     ;;
 esac
 
-# Disable Java, libgcj or related libraries for some systems.
+# Disable Java if libffi is not supported.
 case "${target}" in
-  *-*-chorusos)
+  alpha*-*-*)
+    ;;
+  arm*-*-*)
+    ;;
+  cris-*-*)
+    ;;
+  frv-*-*)
+    ;;
+  hppa*-*-linux*)
+    ;;
+  hppa*-*-hpux*)
+    ;;
+  i?86-*-*)
+    ;;
+  ia64*-*-*)
+    ;;
+  m32r*-*-*)
+    ;;
+  m68k-*-*)
+    ;;
+  mips-sgi-irix6.* | mips*-*-rtems*)
+    ;;
+  mips*-*-linux*)
+    ;;
+  powerpc*-*-linux*)
+    ;;
+  powerpc-*-darwin*)
+    ;;
+  powerpc-*-aix* | rs6000-*-aix*)
+    ;;
+  powerpc-*-freebsd*)
+    ;;
+  powerpc64-*-freebsd*)
+    ;;
+  powerpc*-*-rtems*)
     ;;
+  s390-*-* | s390x-*-*)
+    ;;
+  sh-*-* | sh[[34]]*-*-*)
+    ;;
+  sh64-*-* | sh5*-*-*)
+    ;;
+  sparc*-*-*)
+    ;;
+  x86_64-*-*)
+    ;;
+  *-*-*)
+    unsupported_languages="$unsupported_languages java"
+    ;;
+esac
+
+# Disable Java, libgcj or related libraries for some systems.
+case "${target}" in
   powerpc-*-darwin*)
     ;;
   i[[3456789]]86-*-darwin*)
@@ -584,8 +635,6 @@
 	;;
     esac
     ;;
-  *-*-kaos*)
-    ;;
   *-*-netbsd*)
     # Skip some stuff that's unsupported on some NetBSD configurations.
     case "${target}" in
@@ -621,19 +670,12 @@
   alpha*-*-*)
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
-  am33_2.0-*-linux*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
   sh-*-linux*)
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;    
-  sh*-*-pe|mips*-*-pe|*arm-wince-pe)
+  arm-wince-pe)
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
-  arc-*-*)
-    ;;
-  arm-*-coff)
-    ;;
   arm-*-elf* | arm*-*-eabi* )
     noconfigdirs="$noconfigdirs target-libffi"
     ;;
@@ -642,25 +684,9 @@
   arm*-*-symbianelf*)
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
-  arm-*-pe*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  arm-*-riscix*)
-    ;;
-  avr-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
   bfin-*-*)
-    unsupported_languages="$unsupported_languages java"
     noconfigdirs="$noconfigdirs target-boehm-gc"
     ;;
-  c4x-*-* | tic4x-*-*)
-    ;;
-  tic54x-*-*)
-    ;;
-  cr16-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
   cris-*-* | crisv32-*-*)
     unsupported_languages="$unsupported_languages java"
     case "${target}" in
@@ -670,26 +696,9 @@
 	noconfigdirs="$noconfigdirs target-libffi target-boehm-gc";;
     esac
     ;;
-  d10v-*-*)
-    ;;
-  d30v-*-*)
-    ;;
-  fr30-*-elf*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
   frv-*-*)
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
-  moxie-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  h8300*-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  h8500-*-*)
-    ;;
-  hppa1.1-*-osf* | hppa1.1-*-bsd* )
-    ;;
   hppa*64*-*-linux*)
     # In this case, it's because the hppa64-linux target is for
     # the kernel only at this point and has no libc, and thus no
@@ -698,23 +707,16 @@
     ;;
   hppa*-*-linux*)
     ;;
-  hppa*-*-*elf* | \
-  hppa*-*-lites* | \
-  hppa*-*-openbsd* | \
   hppa*64*-*-*)
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
   hppa*-hp-hpux11*)
     ;;
-  hppa*-*-pro*)
-    ;;
   hppa*-*-*)
     # According to Alexandre Oliva <aoliva@redhat.com>, libjava won't
     # build on HP-UX 10.20.
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
-  i960-*-*)
-    ;;
   ia64*-*-elf*)
     ;;
   ia64*-**-hpux*)
@@ -722,7 +724,7 @@
   ia64*-*-*vms*)
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
-  i[[3456789]]86-*-coff | i[[3456789]]86-*-elf)
+  i[[3456789]]86-*-elf)
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
   i[[3456789]]86-*-linux*)
@@ -740,25 +742,11 @@
     ;;
   i[[3456789]]86-*-interix* )
     ;;
-  i[[3456789]]86-*-pe)
-    ;;
-  i[[3456789]]86-*-sco3.2v5*)
-    ;;
-  i[[3456789]]86-*-sco*)
-    ;;
   i[[3456789]]86-*-solaris2*)
     ;;
-  i[[3456789]]86-*-sysv4*)
-    ;;
-  i[[3456789]]86-*-beos*)
-    ;;
-  i[[3456789]]86-*-rdos*)
-    ;;
   m32r-*-*)
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
-  m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
-    ;;
   m68k-*-elf*)
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
@@ -766,44 +754,19 @@
     ;;
   mmix-*-*)
     noconfigdirs="$noconfigdirs target-libffi target-boehm-gc"
-    unsupported_languages="$unsupported_languages java"
-    ;;
-  mt-*-*)
     ;;
   powerpc-*-aix*)
     # copied from rs6000-*-* entry
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
-  powerpc*-*-winnt* | powerpc*-*-pe*)
-    ;;
-  powerpcle-*-solaris*)
-    ;;
-  powerpc-*-beos*)
-    ;;
   powerpc-*-eabi)
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
   powerpc-*-eabi* | powerpcle-*-eabi* | powerpc-*-rtems* )
     ;;
-  rs6000-*-lynxos*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
   rs6000-*-aix*)
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
-  rs6000-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  m68k-apollo-*)
-    ;;
-  microblaze*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  mips*-sde-elf*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  mips*-*-irix5*)
-    ;;
   mips*-*-irix6*)
     # Linking libjava exceeds command-line length limits on at least
     # IRIX 6.2, but not on IRIX 6.5.
@@ -811,8 +774,6 @@
     # <oldham@codesourcery.com>
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
-  mips*-*-bsd*)
-    ;;
   mips*-*-linux*)
     ;;
   mips*-*-*)
@@ -821,28 +782,14 @@
   sh-*-* | sh64-*-*)
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
-  sparclet-*-aout* | sparc86x-*-*)
-    ;;
   sparc-*-elf*)
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
   sparc64-*-elf*)
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
-  sparclite-*-*)
-    ;;
-  sparc-*-sunos4*)
-    ;;
   sparc-*-solaris* | sparc64-*-solaris* | sparcv9-*-solaris*)
     ;;
-  tic6x-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  v810-*-*)
-    ;;
-  vax-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
   *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
     ;;
   *-*-lynxos*)

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Toplevel cleanup: disable Java when libffi not supported
  2011-04-27 16:34 ` Toplevel cleanup: disable Java when libffi not supported Joseph S. Myers
@ 2011-04-27 16:38   ` Andrew Haley
  2011-04-28  6:34   ` Paolo Bonzini
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 12+ messages in thread
From: Andrew Haley @ 2011-04-27 16:38 UTC (permalink / raw)
  To: java-patches

On 04/27/2011 05:33 PM, Joseph S. Myers wrote:
> This patch, relative to a tree with
> <http://gcc.gnu.org/ml/gcc-patches/2011-04/msg02123.html> applied,
> continues the cleanup of toplevel cases relating to disabling Java or
> Java libraries by arranging for Java to be disabled (via
> unsupported_languages) on targets not supporting libffi, and removing
> many cases in the Java-disabling case statement that are no longer
> needed, either because they relate to targets not supporting libffi or
> because they relate to targets no longer supported in GCC so it
> doesn't matter what the Java configuration is for them.
> 
> The ideal would be for information about libffi-supported targets to
> come from a configure fragment in the libffi/ directory, as per item 4
> in <http://gcc.gnu.org/ml/gcc/2011-03/msg00486.html>.  Given that at
> present there is some divergence between the libffi repository and the
> GCC copy of libffi, however, now may not be the best time to add such
> a fragment in GCC; instead, I put a minimal case statement (covering
> only targets supported by both libffi and GCC) at toplevel.
> 
> Where Java-disabling-related cases did more than just disabling Java
> or ${libgcj} (for example, explicitly disabling target-boehm-gc or
> target-libffi) I left them in for now even if not strictly needed with
> the separate libffi case statement.
> 
> This patch is intended to be safe, in that the only way it should
> change behavior for targets supported by GCC is to disable Java in
> some cases where the libraries would not build because of lack of
> libffi support (whether or not the libraries and front end were
> previously enabled in such cases).
> 
> OK to commit?

That looks like a good improvement.  Fine by me.

Andrew.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Toplevel cleanup: split out libgcj disabling
  2011-04-27 15:50 Toplevel cleanup: split out libgcj disabling Joseph S. Myers
  2011-04-27 16:34 ` Toplevel cleanup: disable Java when libffi not supported Joseph S. Myers
@ 2011-04-27 17:31 ` Mike Stump
  2011-04-28  6:31 ` Paolo Bonzini
  2 siblings, 0 replies; 12+ messages in thread
From: Mike Stump @ 2011-04-27 17:31 UTC (permalink / raw)
  To: Joseph S. Myers
  Cc: gcc-patches, java-patches, bonzini, dj, neroden, aoliva, Ralf.Wildenhues

On Apr 27, 2011, at 8:50 AM, Joseph S. Myers wrote:
> Continuing the toplevel cleanups separating the cases disabling
> different subdirectories

I've audited the two patches for darwin and they seem safe.  Took me a second to figure out why though.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Toplevel cleanup: split out libgcj disabling
  2011-04-27 15:50 Toplevel cleanup: split out libgcj disabling Joseph S. Myers
  2011-04-27 16:34 ` Toplevel cleanup: disable Java when libffi not supported Joseph S. Myers
  2011-04-27 17:31 ` Toplevel cleanup: split out libgcj disabling Mike Stump
@ 2011-04-28  6:31 ` Paolo Bonzini
  2 siblings, 0 replies; 12+ messages in thread
From: Paolo Bonzini @ 2011-04-28  6:31 UTC (permalink / raw)
  To: Joseph S. Myers
  Cc: gcc-patches, java-patches, dj, neroden, aoliva, Ralf.Wildenhues

On 04/27/2011 05:50 PM, Joseph S. Myers wrote:
> Continuing the toplevel cleanups separating the cases disabling
> different subdirectories - on the basis that eventually this
> information should come from the subdirectories, and that as
> previously discussed much of the default disabling of ${libgcj}
> doesn't actually make sense - this patch separates the
> Java-and-${libgcj}-disabling cases out from the rest of the
> directory-disabling cases.
>
> This patch deliberately keeps the case structure the same to make it
> clear it does not change the set of disabled directories at all - thus
> there are now empty cases in both the old and the new case statements.
> These are intended to be cleaned up in subsequent patches.  (Removing
> an empty case is not automatically obvious, since it may cause a later
> case such as *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu |
> *-*-kopensolaris*-gnu or *-*-* to be active instead.  In many cases
> they can be removed, because the combination that would activate the
> other case is not meaningful or because it doesn't matter what the
> Java configuration is for targets that have been removed from or never
> supported in GCC - but I prefer to keep such removals separate.)
>
> OK to commit?
>
> 2011-04-27  Joseph Myers<joseph@codesourcery.com>
>
> 	* configure.ac: Separate cases disabling Java and Java libraries
> 	from general case over targets.
> 	* configure: Regenerate.

Ok.

Paolo

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Toplevel cleanup: disable Java when libffi not supported
  2011-04-27 16:34 ` Toplevel cleanup: disable Java when libffi not supported Joseph S. Myers
  2011-04-27 16:38   ` Andrew Haley
@ 2011-04-28  6:34   ` Paolo Bonzini
  2011-04-28 13:40     ` Joseph S. Myers
  2011-04-28 16:18   ` Toplevel cleanup: reduce libgcj disabling Joseph S. Myers
  2011-04-29 16:26   ` Toplevel cleanup: disable Java when libffi not supported Tom Tromey
  3 siblings, 1 reply; 12+ messages in thread
From: Paolo Bonzini @ 2011-04-28  6:34 UTC (permalink / raw)
  To: Joseph S. Myers
  Cc: gcc-patches, java-patches, dj, neroden, aoliva, Ralf.Wildenhues, green

On 04/27/2011 06:33 PM, Joseph S. Myers wrote:
> This patch, relative to a tree with
> <http://gcc.gnu.org/ml/gcc-patches/2011-04/msg02123.html>  applied,
> continues the cleanup of toplevel cases relating to disabling Java or
> Java libraries by arranging for Java to be disabled (via
> unsupported_languages) on targets not supporting libffi, and removing
> many cases in the Java-disabling case statement that are no longer
> needed, either because they relate to targets not supporting libffi or
> because they relate to targets no longer supported in GCC so it
> doesn't matter what the Java configuration is for them.
>
> The ideal would be for information about libffi-supported targets to
> come from a configure fragment in the libffi/ directory, as per item 4
> in<http://gcc.gnu.org/ml/gcc/2011-03/msg00486.html>.  Given that at
> present there is some divergence between the libffi repository and the
> GCC copy of libffi, however, now may not be the best time to add such
> a fragment in GCC; instead, I put a minimal case statement (covering
> only targets supported by both libffi and GCC) at toplevel.
>
> Where Java-disabling-related cases did more than just disabling Java
> or ${libgcj} (for example, explicitly disabling target-boehm-gc or
> target-libffi) I left them in for now even if not strictly needed with
> the separate libffi case statement.
>
> This patch is intended to be safe, in that the only way it should
> change behavior for targets supported by GCC is to disable Java in
> some cases where the libraries would not build because of lack of
> libffi support (whether or not the libraries and front end were
> previously enabled in such cases).
>
> OK to commit?
>
> 2011-04-27  Joseph Myers<joseph@codesourcery.com>
>
> 	* configure.ac: Disable Java for targets not supporting libffi.
> 	(*-*-kaos*, am33_2.0-*-linux*, sh*-*-pe|mips*-*-pe): Remove cases
> 	in Java-disabling statement.
> 	(*arm-wince-pe): Change to arm-wince-pe.
> 	(arc-*-*, arm-*-coff, arm-*-pe*, arm-*-riscix*, avr-*-*): Remove
> 	cases in Java-disabling statement.
> 	(bfin-*-*): Don't disable Java again.
> 	(c4x-*-* | tic4x-*-*, tic54x-*-*, cr16-*-*, d10v-*-*, d30v-*-*,
> 	fr30-*-elf*, moxie-*-*, h8300*-*-*, h8500-*-*, hppa1.1-*-osf* |
> 	hppa1.1-*-bsd*, hppa*-*-*elf*  | hppa*-*-lites* | hppa*-*-openbsd*,
> 	hppa*-*-pro*, i960-*-*, i[[3456789]]86-*-coff,
> 	i[[3456789]]86-*-pe, i[[3456789]]86-*-sco3.2v5*,
> 	i[[3456789]]86-*-sco*, i[[3456789]]86-*-sysv4*,
> 	i[[3456789]]86-*-beos*, i[[3456789]]86-*-rdos*,
> 	m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*): Remove cases in
> 	Java-disabling statement.
> 	(mmix-*-*): Don't disable Java again.
> 	(mt-*-*, powerpc*-*-winnt* | powerpc*-*-pe*, powerpcle-*-solaris*,
> 	powerpc-*-beos*, rs6000-*-lynxos*, rs6000-*-*, m68k-apollo-*,
> 	microblaze*, mips*-sde-elf*, mips*-*-irix5*, mips*-*-bsd*,
> 	sparclet-*-aout* | sparc86x-*-*, sparclite-*-*, sparc-*-sunos4*,
> 	tic6x-*-*, v810-*-*, vax-*-*): Remove cases in Java-disabling
> 	statement.
> 	* configure: Regenerate.
>

Ok.

Do you plan to finish the switch to unsupported_languages instead of 
noconfigdirs soon )for Java)?

Paolo

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Toplevel cleanup: disable Java when libffi not supported
  2011-04-28  6:34   ` Paolo Bonzini
@ 2011-04-28 13:40     ` Joseph S. Myers
  0 siblings, 0 replies; 12+ messages in thread
From: Joseph S. Myers @ 2011-04-28 13:40 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: gcc-patches, java-patches, dj, neroden, aoliva, Ralf.Wildenhues, green

On Thu, 28 Apr 2011, Paolo Bonzini wrote:

> Do you plan to finish the switch to unsupported_languages instead of
> noconfigdirs soon )for Java)?

I plan one further patch to simplify the libgcj-disabling logic (and in 
particular to eliminate the disabling for *-*-*), but not to convert it 
completely to unsupported_languages.  I also plan to split the 
newlib/libgloss logic out of the general case statement over targets, as 
part of further simplifications there.  I don't plan to work on the 
general elimination of target-libiberty.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Toplevel cleanup: reduce libgcj disabling
  2011-04-27 16:34 ` Toplevel cleanup: disable Java when libffi not supported Joseph S. Myers
  2011-04-27 16:38   ` Andrew Haley
  2011-04-28  6:34   ` Paolo Bonzini
@ 2011-04-28 16:18   ` Joseph S. Myers
  2011-04-28 16:41     ` Paolo Bonzini
  2011-04-29 16:26   ` Toplevel cleanup: disable Java when libffi not supported Tom Tromey
  3 siblings, 1 reply; 12+ messages in thread
From: Joseph S. Myers @ 2011-04-28 16:18 UTC (permalink / raw)
  To: gcc-patches; +Cc: java-patches, bonzini, dj, neroden, aoliva, Ralf.Wildenhues

This patch cleans up the libgcj-disabling case statement at toplevel,
removing the default disabling for *-*-* (which allows other empty
cases to be removed) and disabling based on architecture, or most
cases of architecture-OS combination where the OS previously had
libgcj built for other architectures.

I left the logic restricting libgcj on Darwin to certain targets, but
removed that relating to FreeBSD and NetBSD targets (given the removal
of support for a.out NetBSD, and that there was never such support for
a.out FreeBSD, I doubt the reliability of the lists of targets that
were present).  target-libffi disabling for arm-*-elf* | arm*-*-eabi*
was removed (given that there *is* libffi support for those targets),
and target-zlib disabling for hppa*64*-*-linux* was changed to disable
Java.

This is the last cleanup I plan for this libgcj-disabling logic.  This
patch is *not* conservatively safe; the idea is that if it turns out
that there are problems building some Java library on a
libffi-supporting target where the library was not previously built,
appropriate disabling should be added *with a comment explaining the
problem and probably pointing to a relevant PR*.

OK to commit?

2011-04-28  Joseph Myers  <joseph@codesourcery.com>

	* configure.ac (*-*-dragonfly*, *-*-freebsd*, *-*-netbsd*,
	alpha*-dec-osf*, alpha*-*-linux*, alpha*-*-*, sh-*-linux*,
	arm-*-elf* | arm*-*-eabi*, arm*-*-linux-gnueabi, frv-*-*): Remove
	cases in libgcj-disabling case statement.
	(hppa*64*-*-linux*): Set unsupported_languages instead of
	disabling target-zlib.
	(hppa*64*-*-*): Restrict case in libgcj-disabling case statement
	to hppa*64*-*-hpux*.
	(hppa*-*-*): Restrict case in libgcj-disabling case statement to
	hppa*-*-hpux*.
	(ia64*-*-elf*, ia64*-**-hpux*, i[[3456789]]86-*-elf,
	i[[3456789]]86-*-linux*, *-*-cygwin*, i[[3456789]]86-*-interix*,
	i[[3456789]]86-*-solaris2*, m32r-*-*, m68k-*-elf*, m68*-*-* |
	fido-*-*, powerpc-*-eabi, powerpc-*-eabi* | powerpcle-*-eabi* |
	powerpc-*-rtems*, mips*-*-linux*, mips*-*-*, sh-*-* | sh64-*-*,
	sparc-*-elf*, sparc64-*-elf*, sparc-*-solaris* |
	sparc64-*-solaris* | sparcv9-*-solaris*, *-*-linux* | *-*-gnu* |
	*-*-k*bsd*-gnu | *-*-kopensolaris*-gnu, *-*-*): Remove cases in
	libgcj-disabling case statement.
	* configure: Regenerate.

Index: configure.ac
===================================================================
--- configure.ac	(revision 173069)
+++ configure.ac	(working copy)
@@ -622,29 +622,6 @@
   *-*-darwin*)
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
-  *-*-dragonfly*)
-    ;;
-  *-*-freebsd*)
-    # Skip some stuff that's unsupported on some FreeBSD configurations.
-    case "${target}" in
-      i*86-*-*) ;;
-      alpha*-*-*) ;;
-      x86_64-*-*) ;;
-      *)
-	noconfigdirs="$noconfigdirs ${libgcj}"
-	;;
-    esac
-    ;;
-  *-*-netbsd*)
-    # Skip some stuff that's unsupported on some NetBSD configurations.
-    case "${target}" in
-      i*86-*-netbsdelf*) ;;
-      arm*-*-netbsdelf*) ;;
-      *)
-	noconfigdirs="$noconfigdirs ${libgcj}"
-	;;
-    esac
-    ;;
   *-*-netware*)
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
@@ -660,27 +637,12 @@
   *-*-vxworks*)
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
-  alpha*-dec-osf*)
-    ;;
   alpha*-*-*vms*)
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
-  alpha*-*-linux*)
-    ;;
-  alpha*-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  sh-*-linux*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;    
   arm-wince-pe)
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
-  arm-*-elf* | arm*-*-eabi* )
-    noconfigdirs="$noconfigdirs target-libffi"
-    ;;
-  arm*-*-linux-gnueabi)
-    ;;
   arm*-*-symbianelf*)
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
@@ -696,39 +658,25 @@
 	noconfigdirs="$noconfigdirs target-libffi target-boehm-gc";;
     esac
     ;;
-  frv-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
   hppa*64*-*-linux*)
     # In this case, it's because the hppa64-linux target is for
     # the kernel only at this point and has no libc, and thus no
     # headers, crt*.o, etc., all of which are needed by these.
-    noconfigdirs="$noconfigdirs target-zlib"
+    unsupported_languages="$unsupported_languages java"
     ;;
-  hppa*-*-linux*)
-    ;;
-  hppa*64*-*-*)
+  hppa*64*-*-hpux*)
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
   hppa*-hp-hpux11*)
     ;;
-  hppa*-*-*)
+  hppa*-*-hpux*)
     # According to Alexandre Oliva <aoliva@redhat.com>, libjava won't
     # build on HP-UX 10.20.
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
-  ia64*-*-elf*)
-    ;;
-  ia64*-**-hpux*)
-    ;;
   ia64*-*-*vms*)
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
-  i[[3456789]]86-*-elf)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  i[[3456789]]86-*-linux*)
-    ;;
   i[[3456789]]86-w64-mingw*)
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
@@ -738,20 +686,6 @@
   x86_64-*-mingw*)
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
-  *-*-cygwin*)
-    ;;
-  i[[3456789]]86-*-interix* )
-    ;;
-  i[[3456789]]86-*-solaris2*)
-    ;;
-  m32r-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  m68k-*-elf*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  m68*-*-* | fido-*-*)
-    ;;
   mmix-*-*)
     noconfigdirs="$noconfigdirs target-libffi target-boehm-gc"
     ;;
@@ -759,11 +693,6 @@
     # copied from rs6000-*-* entry
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
-  powerpc-*-eabi)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  powerpc-*-eabi* | powerpcle-*-eabi* | powerpc-*-rtems* )
-    ;;
   rs6000-*-aix*)
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
@@ -774,30 +703,9 @@
     # <oldham@codesourcery.com>
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;;
-  mips*-*-linux*)
-    ;;
-  mips*-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  sh-*-* | sh64-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  sparc-*-elf*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  sparc64-*-elf*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
-  sparc-*-solaris* | sparc64-*-solaris* | sparcv9-*-solaris*)
-    ;;
-  *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
-    ;;
   *-*-lynxos*)
     noconfigdirs="$noconfigdirs ${libgcj}"
     ;; 
-  *-*-*)
-    noconfigdirs="$noconfigdirs ${libgcj}"
-    ;;
 esac
 
 # Default libgloss CPU subdirectory.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Toplevel cleanup: reduce libgcj disabling
  2011-04-28 16:18   ` Toplevel cleanup: reduce libgcj disabling Joseph S. Myers
@ 2011-04-28 16:41     ` Paolo Bonzini
  0 siblings, 0 replies; 12+ messages in thread
From: Paolo Bonzini @ 2011-04-28 16:41 UTC (permalink / raw)
  To: Joseph S. Myers
  Cc: gcc-patches, java-patches, dj, neroden, aoliva, Ralf.Wildenhues

On 04/28/2011 06:17 PM, Joseph S. Myers wrote:
> This patch cleans up the libgcj-disabling case statement at toplevel,
> removing the default disabling for *-*-* (which allows other empty
> cases to be removed) and disabling based on architecture, or most
> cases of architecture-OS combination where the OS previously had
> libgcj built for other architectures.
>
> I left the logic restricting libgcj on Darwin to certain targets, but
> removed that relating to FreeBSD and NetBSD targets (given the removal
> of support for a.out NetBSD, and that there was never such support for
> a.out FreeBSD, I doubt the reliability of the lists of targets that
> were present).  target-libffi disabling for arm-*-elf* | arm*-*-eabi*
> was removed (given that there*is*  libffi support for those targets),
> and target-zlib disabling for hppa*64*-*-linux* was changed to disable
> Java.
>
> This is the last cleanup I plan for this libgcj-disabling logic.  This
> patch is*not*  conservatively safe; the idea is that if it turns out
> that there are problems building some Java library on a
> libffi-supporting target where the library was not previously built,
> appropriate disabling should be added *with a comment explaining the
> problem and probably pointing to a relevant PR*.
>
> OK to commit?
>

Ok.

Paolo

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Toplevel cleanup: disable Java when libffi not supported
  2011-04-27 16:34 ` Toplevel cleanup: disable Java when libffi not supported Joseph S. Myers
                     ` (2 preceding siblings ...)
  2011-04-28 16:18   ` Toplevel cleanup: reduce libgcj disabling Joseph S. Myers
@ 2011-04-29 16:26   ` Tom Tromey
  2011-04-29 22:57     ` Joseph S. Myers
  3 siblings, 1 reply; 12+ messages in thread
From: Tom Tromey @ 2011-04-29 16:26 UTC (permalink / raw)
  To: Joseph S. Myers
  Cc: gcc-patches, java-patches, bonzini, dj, neroden, aoliva,
	Ralf.Wildenhues, green

>>>>> "Joseph" == Joseph S Myers <joseph@codesourcery.com> writes:

Joseph> This patch, relative to a tree with
Joseph> <http://gcc.gnu.org/ml/gcc-patches/2011-04/msg02123.html> applied,
Joseph> continues the cleanup of toplevel cases relating to disabling Java or
Joseph> Java libraries by arranging for Java to be disabled (via
Joseph> unsupported_languages) on targets not supporting libffi

It does make sense to build libjava without libffi.

It just means that libjava has somewhat degraded functionality -- libffi
is needed for the interpreter, for JNI, and for some kinds of reflection
(Method.invoke).

I am not sure if there are any existing targets where libjava works but
libffi does not.  Looking at libjava/configure.host, maybe `arm*-elf'
(but maybe configure.host is out of data, it is certainly possible).

There is also --without-libffi, though; I didn't look to see what your
patch does with this.

A better gate for libjava might be boehm-gc.  It is required to run any
sort of real program.

Joseph> The ideal would be for information about libffi-supported targets to
Joseph> come from a configure fragment in the libffi/ directory, as per item 4
Joseph> in <http://gcc.gnu.org/ml/gcc/2011-03/msg00486.html>.

This would help libjava's configury as well.

Tom

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Toplevel cleanup: disable Java when libffi not supported
  2011-04-29 16:26   ` Toplevel cleanup: disable Java when libffi not supported Tom Tromey
@ 2011-04-29 22:57     ` Joseph S. Myers
  2011-05-03 15:16       ` Tom Tromey
  0 siblings, 1 reply; 12+ messages in thread
From: Joseph S. Myers @ 2011-04-29 22:57 UTC (permalink / raw)
  To: Tom Tromey
  Cc: gcc-patches, java-patches, bonzini, dj, neroden, aoliva,
	Ralf.Wildenhues, green

On Fri, 29 Apr 2011, Tom Tromey wrote:

> >>>>> "Joseph" == Joseph S Myers <joseph@codesourcery.com> writes:
> 
> Joseph> This patch, relative to a tree with
> Joseph> <http://gcc.gnu.org/ml/gcc-patches/2011-04/msg02123.html> applied,
> Joseph> continues the cleanup of toplevel cases relating to disabling Java or
> Joseph> Java libraries by arranging for Java to be disabled (via
> Joseph> unsupported_languages) on targets not supporting libffi
> 
> It does make sense to build libjava without libffi.
> 
> It just means that libjava has somewhat degraded functionality -- libffi
> is needed for the interpreter, for JNI, and for some kinds of reflection
> (Method.invoke).
> 
> I am not sure if there are any existing targets where libjava works but
> libffi does not.  Looking at libjava/configure.host, maybe `arm*-elf'
> (but maybe configure.host is out of data, it is certainly possible).

arm*-elf are targets where libffi's configure thinks it is supported.

> There is also --without-libffi, though; I didn't look to see what your
> patch does with this.
> 
> A better gate for libjava might be boehm-gc.  It is required to run any
> sort of real program.

I should perhaps reiterate that I think the toplevel handles 
unsupported_languages in a suboptimal way.  What it should mean in my view 
is that the languages don't get enabled by default (or by "all" in 
--enable-languages) but can still be enabled by specifying them manually 
in --enable-languages - whereas at present it forces the language to be 
disabled even if the user enables it explicitly.

So Java (and Go) should be disabled by default when libffi isn't 
supported, because they'd try by default to build libffi and so a default 
build will fail.  And much the same applies with boehm-gc.  But if a user 
explicitly enables Java on such a target, libffi should still be disabled 
as unsupported but the front end and other libraries should be built (and 
quite possibly fail).  (Ideally this would have generic logic - for each 
front end, disable it by default if any of the target libraries for that 
language aren't supported.  But that first requires a generic way to get 
information from a library directory about what targets that library 
supports.)

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Toplevel cleanup: disable Java when libffi not supported
  2011-04-29 22:57     ` Joseph S. Myers
@ 2011-05-03 15:16       ` Tom Tromey
  0 siblings, 0 replies; 12+ messages in thread
From: Tom Tromey @ 2011-05-03 15:16 UTC (permalink / raw)
  To: Joseph S. Myers
  Cc: gcc-patches, java-patches, bonzini, dj, neroden, aoliva,
	Ralf.Wildenhues, green

>>>>> "Joseph" == Joseph S Myers <joseph@codesourcery.com> writes:

Joseph> arm*-elf are targets where libffi's configure thinks it is supported.

Thanks.

Joseph> So Java (and Go) should be disabled by default when libffi isn't
Joseph> supported, because they'd try by default to build libffi and so
Joseph> a default build will fail.

In the past, libffi could be disabled independently.  This in itself
would not cause libjava to fail, because libjava accounts for this
possibility.

Since the only existing case where there was a libjava port without a
corresponding libffi port has gone away, I think it isn't very important
to try to support this.  In the unlikely event that someone needs this,
they can come up with a new plan to handle it.

Tom

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-05-03 15:16 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-27 15:50 Toplevel cleanup: split out libgcj disabling Joseph S. Myers
2011-04-27 16:34 ` Toplevel cleanup: disable Java when libffi not supported Joseph S. Myers
2011-04-27 16:38   ` Andrew Haley
2011-04-28  6:34   ` Paolo Bonzini
2011-04-28 13:40     ` Joseph S. Myers
2011-04-28 16:18   ` Toplevel cleanup: reduce libgcj disabling Joseph S. Myers
2011-04-28 16:41     ` Paolo Bonzini
2011-04-29 16:26   ` Toplevel cleanup: disable Java when libffi not supported Tom Tromey
2011-04-29 22:57     ` Joseph S. Myers
2011-05-03 15:16       ` Tom Tromey
2011-04-27 17:31 ` Toplevel cleanup: split out libgcj disabling Mike Stump
2011-04-28  6:31 ` Paolo Bonzini

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