This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: PATCH: libjava NetBSD configuration
- From: Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>
- To: Krister Walfridsson <cato at df dot lth dot se>
- Cc: java-patches at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org, tromey at redhat dot com
- Date: Thu, 11 Apr 2002 16:58:15 +1200
- Subject: Re: PATCH: libjava NetBSD configuration
- References: <Pine.GSO.4.44.0204110148060.2847-100000@igloo.df.lth.se>
Krister Walfridsson wrote:
>NetBSD does not implement MD_FALLBACK_FRAME_STATE_FOR, so we need to
>set DIVIDESPEC and CHECKREFSPEC. This removes 21 failures in the
>test suite.
>
>Bootstrapped and checked on i386-unknown-netbsdelf1.5ZC.
>
> /Krister
>
>
>2002-04-10 Krister Walfridsson <cato@df.lth.se>
>
> * configure.host: (*-*-netbsd*) Set DIVIDESPEC and CHECKREFSPEC.
>
Actually for 3.1 we should really set these for all targets that both:
- arn't linux on alpha/PPC/IA64/x86
- arn't using SJLJ exceptions
This patch should do that. Could someone on FreeBSD or NetBSD verify
that this does the right thing please?
regards
Bryce.
2002-04-11 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* configure.host: Set can_unwind_signal on hosts which support it.
Don't set CHECKREFSPEC and DIVIDESPEC for FreeBSD.
* configure.in: Set CHECKREFSPEC and DIVIDESPEC if not using SJLJ
exceptions and can_unwind_signal isn't set.
* configure: Rebuilt.
Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/libjava/configure.in,v
retrieving revision 1.124
diff -u -r1.124 configure.in
--- configure.in 27 Mar 2002 16:41:34 -0000 1.124
+++ configure.in 11 Apr 2002 04:45:15 -0000
@@ -153,6 +153,14 @@
AC_LANG_RESTORE
AC_MSG_RESULT($ac_exception_model_name)
+# If we are non using SJLJ exceptions, and this host does not have support
+# for unwinding from a signal handler, enable checked dereferences and divides.
+if test $can_unwind_signal = no && test $enable_sjlj_exceptions = no; then
+ CHECKREFSPEC=-fcheck-references
+ DIVIDESPEC=-fuse-divide-subroutine
+ EXCEPTIONSPEC=
+fi
+
dnl See if the user wants to disable java.net. This is the mildly
dnl ugly way that we admit that target-side configuration sucks.
AC_ARG_ENABLE(java-net,
Index: configure.host
===================================================================
RCS file: /cvs/gcc/gcc/libjava/configure.host,v
retrieving revision 1.30
diff -u -r1.30 configure.host
--- configure.host 5 Apr 2002 04:17:11 -0000 1.30
+++ configure.host 11 Apr 2002 04:45:15 -0000
@@ -26,6 +26,8 @@
# 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
+# can_unwind_signal Set to "yes" if the EH unwinder supports throwing
+# from a signal handler.
libgcj_flags=
libgcj_cflags=
@@ -36,6 +38,7 @@
enable_hash_synchronization_default=no
sysdeps_dir=generic
slow_pthread_self=
+can_unwind_signal=no
case "${target_optspace}:${host}" in
yes:*)
@@ -58,7 +61,6 @@
DIVIDESPEC=-fuse-divide-subroutine
EXCEPTIONSPEC=-fnon-call-exceptions
-CHECKREFSPEC=
# This case statement supports per-CPU defaults.
case "${host}" in
@@ -106,8 +108,6 @@
with_libffi_default=no
PROCESS=Ecos
FILE=Posix
- CHECKREFSPEC=-fcheck-references
- EXCEPTIONSPEC=
enable_java_net_default=no
enable_getenv_properties_default=no
enable_main_args_default=no
@@ -115,18 +115,21 @@
esac
# This case statement supports generic port properties and may refine
-# the above per-CPU defaults. Note: If your OS does not implement
-# MD_FALLBACK_FRAME_STATE_FOR, then you may want to set CHECKREFSPEC,
-# DIVIDESPEC (to fix >20 test cases) and EXCEPTIONSPEC (to reduce EH
-# bloat only) here.
+# the above per-CPU defaults. Note: If your OS implements
+# MD_FALLBACK_FRAME_STATE_FOR, then you want to set can_throw_from_signal
+# here.
case "${host}" in
+ i[34567]86*-linux* | \
+ powerpc*-linux* | \
+ alpha*-linux* | \
+ ia64-*)
+ can_unwind_signal=yes
+ ;;
*-*-darwin*)
enable_hash_synchronization_default=no
slow_pthread_self=
;;
*-*-freebsd*)
- DIVIDESPEC=-fuse-divide-subroutine
- CHECKREFSPEC=-fcheck-references
slow_pthread_self=
;;
esac