This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libjava status on Solaris 8/Intel and IRIX 6.5


Andrew Haley writes:

>  > I assume you're going to check in your Solaris DIVIDESPEC change?
> 
> I don't have a machine to test on.

I can, once there's agreement on the complete configure.host vs. .target
and libgcj.spec changes.  My current proposed patch is included below; I'll
test it later this week.

	Rainer


Mon Mar 18 19:18:14 2002  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* configure.target: Renamed from configure.host.
	Changed host to target references.
	Introduce target_cpu and target_os switches, moving cpu- or
	os-only sections here.
	* Makefile.am (CONFIG_STATUS_DEPENDENCIES): Reflect this.
	* acinclude.m4: Likewise.
	* Makefile.in: Rebuilt.
	* aclocal.m4: Likewise.
	
	* configure.target (REFERENCESPEC): New.
	* libgcj.spec.in (jc1): Use it.
	* configure.in (REFERENCESPEC): Substitute it.

	* configure.target (i?86-*-solaris2*): Keep default DIVIDESPEC.

	* configure.target (solaris2*, mips-sgi-irix6*): Use
	-fcheck-references for REFERENCESPEC.
	
Index: Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libjava/Makefile.am,v
retrieving revision 1.202.2.3
diff -u -p -r1.202.2.3 Makefile.am
--- Makefile.am	2002/03/06 19:12:42	1.202.2.3
+++ Makefile.am	2002/03/18 20:47:19
@@ -1960,7 +1960,7 @@ AM_MAKEFLAGS = \
 	"RANLIB=$(RANLIB)" \
 	"DESTDIR=$(DESTDIR)"
 
-CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host
+CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.target
 
 MAKEOVERRIDES=
 
Index: acinclude.m4
===================================================================
RCS file: /cvs/gcc/gcc/libjava/acinclude.m4,v
retrieving revision 1.18.2.1
diff -u -p -r1.18.2.1 acinclude.m4
--- acinclude.m4	2002/02/27 02:22:33	1.18.2.1
+++ acinclude.m4	2002/03/18 20:47:19
@@ -159,7 +159,7 @@ if false; then
   AC_EXEEXT
 fi
 
-# configure.host sets the following important variables
+# configure.target sets the following important variables
 #	libgcj_cflags    - host specific C compiler flags
 #	libgcj_cxxflags  - host specific C++ compiler flags
 #	libgcj_javaflags - host specific Java compiler flags
@@ -168,7 +168,7 @@ libgcj_cflags=
 libgcj_cxxflags=
 libgcj_javaflags=
 
-. [$]{srcdir}/configure.host
+. [$]{srcdir}/configure.target
 
 LIBGCJ_CFLAGS="[$]{libgcj_cflags}"
 LIBGCJ_CXXFLAGS="[$]{libgcj_cxxflags}"
Index: configure.target
===================================================================
RCS file: configure.target
diff -N configure.target
--- /dev/null	Tue May  5 13:32:27 1998
+++ configure.target	Mon Mar 18 12:47:19 2002
@@ -0,0 +1,136 @@
+# configure.target
+
+# This shell script handles all target based configuration for libgcj.
+# It sets various shell variables based on the target and the
+# configuration options.  You can modify this shell script without
+# needing to rerun autoconf.
+
+# This shell script should be invoked as
+#   . configure.target
+# If it encounters an error, it will exit with a message.
+
+# It uses the following shell variables:
+#   target		The configuration target
+#   target_cpu		The configuration target CPU
+#   target_os             The configuration target OS
+#   target_optspace	--enable-target-optspace ("yes", "no", "")
+
+# It sets the following shell variables:
+#   libgcj_cflags	Special CFLAGS to use when building
+#   libgcj_cxxflags	Special CXXFLAGS to use when building
+#   libgcj_javaflags	Special JAVAFLAGS to use when building
+#   libgcj_interpreter  If the bytecode interpreter supports this platform.
+#   enable_java_net_default  If java.net native code should be enabled by
+#                            default.
+#   enable_hash_synchronization_default  If hash synchronization should be
+#                                        enabled by default.
+#   sysdeps_dir		Directory containing system-dependent headers
+#   slow_pthread_self   The synchronization code should try to avoid 
+#			pthread_self calls by caching thread IDs in a hashtable
+
+libgcj_flags=
+libgcj_cflags=
+libgcj_cxxflags=
+libgcj_javaflags=
+libgcj_interpreter=
+enable_java_net_default=yes
+enable_hash_synchronization_default=no
+sysdeps_dir=generic
+slow_pthread_self=
+
+case "${target_optspace}:${target}" in
+  yes:*)
+    libgcj_flags="${libgcj_flags} -Os"
+    ;;
+  :m32r-* | :d10v-* | :d30v-*)
+    libgcj_flags="${libgcj_flags} -Os"
+    ;;
+  no:* | :*)
+    # Nothing.
+    ;;
+esac
+
+AM_RUNTESTFLAGS= 
+
+echo "$target"
+
+DIVIDESPEC=-fuse-divide-subroutine
+REFERENCESPEC=
+EXCEPTIONSPEC=-fnon-call-exceptions
+
+# Set any CPU dependent compiler flags.
+# THIS TABLE IS SORTED.  KEEP IT THAT WAY.
+case "${target_cpu}" in
+  alpha*)
+	sysdeps_dir=alpha
+	libgcj_flags="${libgcj_flags} -mieee"
+	libgcj_interpreter=yes
+	enable_hash_synchronization_default=yes
+	;;
+  i[3456]6)
+	sysdeps_dir=i386
+	libgcj_flags="${libgcj_flags} -ffloat-store"
+	libgcj_interpreter=yes
+	libgcj_cxxflags="-D__NO_MATH_INLINES"
+	libgcj_cflags="-D__NO_MATH_INLINES"
+	DIVIDESPEC=-fno-use-divide-subroutine
+	enable_hash_synchronization_default=yes
+	slow_pthread_self=yes
+	;;
+  ia64)
+	sysdeps_dir=ia64
+        libgcj_flags="${libgcj_flags} -funwind-tables"
+	libgcj_interpreter=yes
+	enable_hash_synchronization_default=yes
+	;;
+esac
+
+# Set any OS dependent compiler flags.
+# THIS TABLE IS SORTED.  KEEP IT THAT WAY.
+case "${target_os}" in
+  solaris2*)
+	REFERENCESPEC=-fcheck-references
+	;;
+esac
+
+# Set any flags dependent on the full target triplet.
+# THIS TABLE IS SORTED.  KEEP IT THAT WAY.
+case "${target}" in
+  i?86-*-solaris2*)
+	# override i?86 default
+	DIVIDESPEC=-use-divide-subroutine
+	;;
+  mips-sgi-irix6*)
+	REFERENCESPEC=-fcheck-references
+	;;
+  mips-tx39-*|mipstx39-unknown-*)
+	libgcj_flags="${libgcj_flags} -G 0"
+	LDFLAGS="$LDFLAGS -Tjmr3904dram.ld"
+	AM_RUNTESTFLAGS="--target_board=jmr3904-sim"	
+	# Use "Ecos" processes since they are a no-op.
+	PROCESS=Ecos
+ 	enable_java_net_default=no
+ 	enable_getenv_properties_default=no
+	;;
+  powerpc*-darwin*)
+	sysdeps_dir=powerpc
+        libgcj_interpreter=yes
+	;;
+  powerpc*-linux*)
+	sysdeps_dir=powerpc
+	libgcj_interpreter=yes
+	enable_hash_synchronization_default=yes
+	slow_pthread_self=yes
+	;;
+  xscale*-elf)
+	with_libffi_default=no
+	PROCESS=Ecos
+	enable_java_net_default=no
+	enable_getenv_properties_default=no
+	enable_main_args_default=no
+	;;
+esac
+
+libgcj_cflags="${libgcj_cflags} ${libgcj_flags}"
+libgcj_cxxflags="${libgcj_cxxflags} ${libgcj_flags}"
+libgcj_javaflags="${libgcj_javaflags} ${libgcj_flags}"
Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/libjava/configure.in,v
retrieving revision 1.114.2.3
diff -u -p -r1.114.2.3 configure.in
--- configure.in	2002/03/10 03:30:48	1.114.2.3
+++ configure.in	2002/03/18 20:47:19
@@ -736,6 +736,7 @@ AC_SUBST(ZDEPS)
 AC_SUBST(ZINCS)
 AC_SUBST(DIVIDESPEC)
 AC_SUBST(EXCEPTIONSPEC)
+AC_SUBST(REFERENCESPEC)
 
 AM_CONDITIONAL(CANADIAN, test "$CANADIAN" = yes)
 AM_CONDITIONAL(NULL_TARGET, test "$NULL_TARGET" = yes)
Index: libgcj.spec.in
===================================================================
RCS file: /cvs/gcc/gcc/libjava/libgcj.spec.in,v
retrieving revision 1.20
diff -u -p -r1.20 libgcj.spec.in
--- libgcj.spec.in	2001/08/01 12:33:38	1.20
+++ libgcj.spec.in	2002/03/18 20:47:19
@@ -6,4 +6,4 @@
 %rename lib liborig
 *lib: -lgcj -lm @LIBICONV@ @GCSPEC@ @THREADSPEC@ @ZLIBSPEC@ @SYSTEMSPEC@ %(libgcc) %(liborig)
 
-*jc1: @HASH_SYNC_SPEC@ @DIVIDESPEC@ @JC1GCSPEC@ @EXCEPTIONSPEC@ -fkeep-inline-functions
+*jc1: @HASH_SYNC_SPEC@ @DIVIDESPEC@ @JC1GCSPEC@ @EXCEPTIONSPEC@ @REFERENCESPEC@ -fkeep-inline-functions


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]