diff options
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 35 | ||||
-rw-r--r-- | libjava/Makefile.am | 9 | ||||
-rw-r--r-- | libjava/Makefile.in | 21 | ||||
-rwxr-xr-x | libjava/configure | 2 | ||||
-rw-r--r-- | libjava/configure.ac | 2 | ||||
-rw-r--r-- | libjava/gnu/classpath/natConfiguration.cc | 2 | ||||
-rw-r--r-- | libjava/include/config.h.in | 6 | ||||
-rw-r--r-- | libjava/include/java-assert.h | 6 | ||||
-rw-r--r-- | libjava/interpret-run.cc | 16 | ||||
-rw-r--r-- | libjava/interpret.cc | 8 | ||||
-rw-r--r-- | libjava/java/io/natVMObjectInputStream.cc | 2 | ||||
-rw-r--r-- | libjava/java/lang/natVMClassLoader.cc | 2 | ||||
-rw-r--r-- | libjava/prims.cc | 4 | ||||
-rw-r--r-- | libjava/testsuite/lib/libjava.exp | 2 | ||||
-rw-r--r-- | libjava/testsuite/libjava.jni/jni.exp | 5 | ||||
-rw-r--r-- | libjava/testsuite/libjava.jvmti/jvmti-interp.exp | 3 |
16 files changed, 95 insertions, 30 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 878797a96fa..cb57e6f71eb 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,38 @@ +2009-04-28 Dave Korn <dave.korn.cygwin@gmail.com> + + * testsuite/libjava.jvmti/jvmti-interp.exp + (gcj_jni_compile_c_to_so): Fix so extension to '.dll' on win32. + * testsuite/lib/libjava.exp (libjava_init): Likewise. + * testsuite/libjava.jni/jni.exp + (gcj_jni_compile_c_to_so): Likewise. + (gcj_jni_test_one): Likewise. + +2009-04-28 Andrew Haley <aph@redhat.com> + + PR libgcj/39899 + * Makefile.am (libgcj_tools_la_LDFLAGS): Add + -fno-bootstrap-classes to libgcj_tools_la_GCJFLAGS. + * Makefile.in: Regenerate. + +2009-04-28 Dave Korn <dave.korn.cygwin@gmail.com> + + * interpret.cc (DEBUG): Rename this ... + (__GCJ_DEBUG): ... to this throughout. + * configure.ac: Likewise. + * interpret-run.cc: Likewise. + * prims.cc: Likewise. + * gnu/classpath/natConfiguration.cc: Likewise. + * include/java-assert.h: Likewise. + * java/io/natVMObjectInputStream.cc: Likewise. + + * configure: Regenerate. + * include/config.h.in: Regenerate. + +2009-04-28 Dave Korn <dave.korn.cygwin@gmail.com> + + * java/lang/natVMClassLoader.cc + (java::lang::VMClassLoader::defineClass): Fix assert. + 2009-04-26 Matthias Klose <doko@ubuntu.com> * contrib/aot-compile.in: Print diagnostics for malformed or invalid diff --git a/libjava/Makefile.am b/libjava/Makefile.am index 7db8a444a5f..839d2963c52 100644 --- a/libjava/Makefile.am +++ b/libjava/Makefile.am @@ -305,8 +305,15 @@ libgcj_la_LINK = $(LIBLINK) ## compiled. EXTRA_libgcj_la_SOURCES = java/lang/Object.java +# We compile libgcj_tools with -findirect-dispatch so that they can +# depend on external classes: in particular, gjdoc uses antlr. In +# addition, -fno-bootstrap-classes ensures that the tools are loaded +# by the system class loader rather than the bootstrap class loader: +# only core library classes should be loaded by the bootstrap loader. libgcj_tools_la_SOURCES = classpath/tools/tools.zip -libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findirect-dispatch -fno-indirect-classes -fsource-filename=$(here)/classpath/tools/all-classes.lst +libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findirect-dispatch \ + -fno-bootstrap-classes -fno-indirect-classes \ + -fsource-filename=$(here)/classpath/tools/all-classes.lst libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \ -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) diff --git a/libjava/Makefile.in b/libjava/Makefile.in index b9e38dfb8bc..4e2c89f0393 100644 --- a/libjava/Makefile.in +++ b/libjava/Makefile.in @@ -72,6 +72,7 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/../compile \ $(top_srcdir)/contrib/aot-compile-rpm.in \ $(top_srcdir)/contrib/aot-compile.in \ $(top_srcdir)/contrib/aotcompile.py.in \ + $(top_srcdir)/contrib/generate-cacerts.pl.in \ $(top_srcdir)/contrib/rebuild-gcj-db.in \ $(top_srcdir)/scripts/jar.in COPYING ChangeLog NEWS THANKS @MAINTAINER_MODE_TRUE@@NATIVE_TRUE@am__append_19 = gen-from-JIS @@ -111,9 +112,10 @@ CONFIG_HEADER = $(top_builddir)/include/config.h \ $(top_builddir)/gcj/libgcj-config.h CONFIG_CLEAN_FILES = libgcj.pc libgcj.spec libgcj-test.spec \ contrib/aotcompile.py contrib/aot-compile \ - contrib/aot-compile-rpm contrib/rebuild-gcj-db scripts/jar \ - java/io/natFile.cc java/lang/natConcreteProcess.cc \ - java/net/natVMInetAddress.cc java/net/natVMNetworkInterface.cc \ + contrib/aot-compile-rpm contrib/generate-cacerts.pl \ + contrib/rebuild-gcj-db scripts/jar java/io/natFile.cc \ + java/lang/natConcreteProcess.cc java/net/natVMInetAddress.cc \ + java/net/natVMNetworkInterface.cc \ gnu/java/net/natPlainSocketImpl.cc \ gnu/java/net/natPlainDatagramSocketImpl.cc \ gnu/java/nio/natVMPipe.cc gnu/java/nio/natVMSelector.cc \ @@ -1028,8 +1030,17 @@ libgcj_la_DEPENDENCIES = libgcj-$(gcc_version).jar java/lang/Object.lo \ $(libgcj_la_LIBADD) $(am__append_18) libgcj_la_LINK = $(LIBLINK) EXTRA_libgcj_la_SOURCES = java/lang/Object.java + +# We compile libgcj_tools with -findirect-dispatch so that they can +# depend on external classes: in particular, gjdoc uses antlr. In +# addition, -fno-bootstrap-classes ensures that the tools are loaded +# by the system class loader rather than the bootstrap class loader: +# only core library classes should be loaded by the bootstrap loader. libgcj_tools_la_SOURCES = classpath/tools/tools.zip -libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findirect-dispatch -fno-indirect-classes -fsource-filename=$(here)/classpath/tools/all-classes.lst +libgcj_tools_la_GCJFLAGS = $(AM_GCJFLAGS) -findirect-dispatch \ + -fno-bootstrap-classes -fno-indirect-classes \ + -fsource-filename=$(here)/classpath/tools/all-classes.lst + libgcj_tools_la_LDFLAGS = -rpath $(toolexeclibdir) \ -version-info `grep -v '^\#' $(srcdir)/libtool-version` \ $(LIBGCJ_LD_SYMBOLIC_FUNCTIONS) @@ -8686,6 +8697,8 @@ contrib/aot-compile: $(top_builddir)/config.status $(top_srcdir)/contrib/aot-com cd $(top_builddir) && $(SHELL) ./config.status $@ contrib/aot-compile-rpm: $(top_builddir)/config.status $(top_srcdir)/contrib/aot-compile-rpm.in cd $(top_builddir) && $(SHELL) ./config.status $@ +contrib/generate-cacerts.pl: $(top_builddir)/config.status $(top_srcdir)/contrib/generate-cacerts.pl.in + cd $(top_builddir) && $(SHELL) ./config.status $@ contrib/rebuild-gcj-db: $(top_builddir)/config.status $(top_srcdir)/contrib/rebuild-gcj-db.in cd $(top_builddir) && $(SHELL) ./config.status $@ scripts/jar: $(top_builddir)/config.status $(top_srcdir)/scripts/jar.in diff --git a/libjava/configure b/libjava/configure index 868c4f70a0d..6217bb1dd76 100755 --- a/libjava/configure +++ b/libjava/configure @@ -5268,7 +5268,7 @@ if test "${enable_libgcj_debug+set}" = set; then if test "$enable_libgcj_debug" = yes; then cat >>confdefs.h <<\_ACEOF -#define DEBUG 1 +#define __GCJ_DEBUG 1 _ACEOF LIBGCJDEBUG="enable" diff --git a/libjava/configure.ac b/libjava/configure.ac index 05d2371724d..c57356a8cde 100644 --- a/libjava/configure.ac +++ b/libjava/configure.ac @@ -244,7 +244,7 @@ AC_ARG_ENABLE(libgcj-debug, AS_HELP_STRING([--enable-libgcj-debug], [enable runtime debugging code]), [if test "$enable_libgcj_debug" = yes; then - AC_DEFINE(DEBUG, 1, [Define this if you want runtime debugging enabled.]) + AC_DEFINE(__GCJ_DEBUG, 1, [Define this if you want runtime debugging enabled.]) LIBGCJDEBUG="enable" fi]) diff --git a/libjava/gnu/classpath/natConfiguration.cc b/libjava/gnu/classpath/natConfiguration.cc index 06f119c2b97..b7b8161e709 100644 --- a/libjava/gnu/classpath/natConfiguration.cc +++ b/libjava/gnu/classpath/natConfiguration.cc @@ -25,7 +25,7 @@ gnu::classpath::Configuration::classpath_home() jboolean gnu::classpath::Configuration::debug() { -#ifdef DEBUG +#ifdef __GCJ_DEBUG return true; #else return false; diff --git a/libjava/include/config.h.in b/libjava/include/config.h.in index 3fdde3944f2..b81e0d3e1f4 100644 --- a/libjava/include/config.h.in +++ b/libjava/include/config.h.in @@ -3,9 +3,6 @@ /* Name of default AWT toolkit */ #undef AWT_TOOLKIT -/* Define this if you want runtime debugging enabled. */ -#undef DEBUG - /* Define if system properties shouldn't be read from getenv("GCJ_PROPERTIES"). */ #undef DISABLE_GETENV_PROPERTIES @@ -457,5 +454,8 @@ /* Required define if using POSIX threads */ #undef _REENTRANT +/* Define this if you want runtime debugging enabled. */ +#undef __GCJ_DEBUG + /* Define to `int' if <sys/types.h> does not define. */ #undef ssize_t diff --git a/libjava/include/java-assert.h b/libjava/include/java-assert.h index 6f178bd9e98..57962418b7d 100644 --- a/libjava/include/java-assert.h +++ b/libjava/include/java-assert.h @@ -16,7 +16,7 @@ details. */ void _Jv_Abort (const char *, const char *, int, const char *) __attribute__ ((__noreturn__)); -#ifdef DEBUG +#ifdef __GCJ_DEBUG #define _Jv_AssertDoCall(Message) _Jv_Abort (__FUNCTION__, __FILE__, __LINE__, Message) #define JvAssertMessage(Expr, Message) \ @@ -26,13 +26,13 @@ void _Jv_Abort (const char *, const char *, int, const char *) #define JvFail(Message) _Jv_AssertDoCall (Message) -#else /* DEBUG */ +#else /* __GCJ_DEBUG */ #define _Jv_AssertDoCall(Message) #define JvAssertMessage(Expr, Message) #define JvAssert(Expr) #define JvFail(Message) _Jv_Abort (0, 0, 0, Message) -#endif /* not DEBUG */ +#endif /* not __GCJ_DEBUG */ #endif /* __JAVA_ASSERT_H__ */ diff --git a/libjava/interpret-run.cc b/libjava/interpret-run.cc index 059195360ed..a4c2d4dab43 100644 --- a/libjava/interpret-run.cc +++ b/libjava/interpret-run.cc @@ -23,7 +23,7 @@ details. */ // returns. java::lang::Thread *thread = java::lang::Thread::currentThread(); -#ifdef DEBUG +#ifdef __GCJ_DEBUG _Jv_InterpFrame frame_desc (meth, thread, NULL, &pc); #else _Jv_InterpFrame frame_desc (meth, thread); @@ -38,7 +38,7 @@ details. */ _Jv_word locals[meth->max_locals]; -#ifdef DEBUG +#ifdef __GCJ_DEBUG // This is the information needed to get and set local variables with // proper type checking. frame_desc.locals = locals; @@ -126,7 +126,7 @@ details. */ continue; } } -#endif /* DEBUG */ +#endif /* __GCJ_DEBUG */ #define INSN_LABEL(op) &&insn_##op @@ -347,7 +347,7 @@ details. */ #ifdef DIRECT_THREADED -#ifdef DEBUG +#ifdef __GCJ_DEBUG #undef NEXT_INSN #define NEXT_INSN \ do \ @@ -392,7 +392,7 @@ details. */ #undef INTERP_REPORT_EXCEPTION #define INTERP_REPORT_EXCEPTION(Jthrowable) REPORT_EXCEPTION (Jthrowable) -#else // !DEBUG +#else // !__GCJ_DEBUG #undef NEXT_INSN #define NEXT_INSN goto *((pc++)->insn) @@ -416,7 +416,7 @@ details. */ #undef INTERP_REPORT_EXCEPTION #define INTERP_REPORT_EXCEPTION(Jthrowable) /* not needed when not debugging */ -#endif // !DEBUG +#endif // !__GCJ_DEBUG #define INTVAL() ((pc++)->int_val) #define AVAL() ((pc++)->datum) @@ -450,7 +450,7 @@ details. */ #else -#ifdef DEBUG +#ifdef __GCJ_DEBUG #define NEXT_INSN \ do \ { \ @@ -2677,7 +2677,7 @@ details. */ { sp = stack; sp++->o = ex; // Push exception. -#ifdef DEBUG +#ifdef __GCJ_DEBUG if (JVMTI_REQUESTED_EVENT (ExceptionCatch)) { using namespace gnu::gcj::jvmti; diff --git a/libjava/interpret.cc b/libjava/interpret.cc index dc1114f65f1..3f690d7b27c 100644 --- a/libjava/interpret.cc +++ b/libjava/interpret.cc @@ -983,7 +983,7 @@ void _Jv_InterpMethod::run (void *retp, INTERP_FFI_RAW_TYPE *args, _Jv_InterpMethod *meth) { -#undef DEBUG +#undef __GCJ_DEBUG #undef DEBUG_LOCALS_INSN #define DEBUG_LOCALS_INSN(s, t) do {} while (0) @@ -994,7 +994,7 @@ void _Jv_InterpMethod::run_debug (void *retp, INTERP_FFI_RAW_TYPE *args, _Jv_InterpMethod *meth) { -#define DEBUG +#define __GCJ_DEBUG #undef DEBUG_LOCALS_INSN #define DEBUG_LOCALS_INSN(s, t) \ do \ @@ -1719,7 +1719,7 @@ throw_class_format_error (const char *msg) CATCH_LOCATION with the method and location where the catch will occur. If the exception is not caught, these are set to 0. - This function should only be used with the DEBUG interpreter. */ + This function should only be used with the __GCJ_DEBUG interpreter. */ static void find_catch_location (::java::lang::Throwable *exc, jthread thread, jmethodID *catch_method, jlong *catch_loc) @@ -1751,7 +1751,7 @@ find_catch_location (::java::lang::Throwable *exc, jthread thread, caught (if it is caught). Like find_catch_location, this should only be called with the - DEBUG interpreter. Since a few exceptions occur outside the + __GCJ_DEBUG interpreter. Since a few exceptions occur outside the interpreter proper, it is important to not call this function without checking JVMTI_REQUESTED_EVENT(Exception) first. */ void diff --git a/libjava/java/io/natVMObjectInputStream.cc b/libjava/java/io/natVMObjectInputStream.cc index 86410a4e76b..eccf0eb0255 100644 --- a/libjava/java/io/natVMObjectInputStream.cc +++ b/libjava/java/io/natVMObjectInputStream.cc @@ -26,7 +26,7 @@ details. */ #include <java/lang/reflect/Method.h> #include <java-stack.h> -#ifdef DEBUG +#ifdef __GCJ_DEBUG #include <java/lang/System.h> #include <java/io/PrintStream.h> #endif diff --git a/libjava/java/lang/natVMClassLoader.cc b/libjava/java/lang/natVMClassLoader.cc index 3e5ff3ec70e..4edff7dafda 100644 --- a/libjava/java/lang/natVMClassLoader.cc +++ b/libjava/java/lang/natVMClassLoader.cc @@ -96,7 +96,7 @@ java::lang::VMClassLoader::defineClass (java::lang::ClassLoader *loader, } // if everything proceeded sucessfully, we're loaded. - JvAssert (klass->state == JV_STATE_LOADED); + JvAssert (klass->state == JV_STATE_READ); } #endif // INTERPRETER diff --git a/libjava/prims.cc b/libjava/prims.cc index d94cd92cbc7..90f8dc5ca23 100644 --- a/libjava/prims.cc +++ b/libjava/prims.cc @@ -460,7 +460,7 @@ _Jv_makeUtf8Const (jstring string) -#ifdef DEBUG +#ifdef __GCJ_DEBUG void _Jv_Abort (const char *function, const char *file, int line, const char *message) @@ -469,7 +469,7 @@ void _Jv_Abort (const char *, const char *, int, const char *message) #endif { -#ifdef DEBUG +#ifdef __GCJ_DEBUG fprintf (stderr, "libgcj failure: %s\n in function %s, file %s, line %d\n", message, function, file, line); diff --git a/libjava/testsuite/lib/libjava.exp b/libjava/testsuite/lib/libjava.exp index a31c2bc63d3..510e4ac80d8 100644 --- a/libjava/testsuite/lib/libjava.exp +++ b/libjava/testsuite/lib/libjava.exp @@ -202,6 +202,8 @@ proc libjava_init { args } { if { [istarget "*-*-darwin*"] } { set so_extension "dylib" + } elseif { [istarget "*-*-cygwin*"] || [istarget "*-*-mingw*"] } { + set so_extension "dll" } else { set so_extension "so" } diff --git a/libjava/testsuite/libjava.jni/jni.exp b/libjava/testsuite/libjava.jni/jni.exp index 4ed27cdf0d1..65051287b5a 100644 --- a/libjava/testsuite/libjava.jni/jni.exp +++ b/libjava/testsuite/libjava.jni/jni.exp @@ -21,6 +21,9 @@ proc gcj_jni_compile_c_to_so {file {options {}}} { } elseif { [istarget "hppa*-hp-hpux*"] } { set so_extension "sl" set so_flag "-shared" + } elseif { [istarget "*-*-cygwin*"] || [istarget "*-*-mingw*"] } { + set so_extension "dll" + set so_flag "-shared" } else { set so_extension "so" set so_flag "-shared" @@ -99,6 +102,8 @@ proc gcj_jni_test_one {file} { set so_extension "dylib" } elseif { [istarget "hppa*-hp-hpux*"] } { set so_extension "sl" + } elseif { [istarget "*-*-cygwin*"] || [istarget "*-*-mingw*"] } { + set so_extension "dll" } else { set so_extension "so" } diff --git a/libjava/testsuite/libjava.jvmti/jvmti-interp.exp b/libjava/testsuite/libjava.jvmti/jvmti-interp.exp index 68b1fc8c177..e81eda52025 100644 --- a/libjava/testsuite/libjava.jvmti/jvmti-interp.exp +++ b/libjava/testsuite/libjava.jvmti/jvmti-interp.exp @@ -25,6 +25,9 @@ proc gcj_jni_compile_c_to_so {file {options {}}} { } elseif { [istarget "hppa*-hp-hpux*"] } { set so_extension "sl" set so_flag "-shared" + } elseif { [istarget "*-*-cygwin*"] || [istarget "*-*-mingw*"] } { + set so_extension "dll" + set so_flag "-shared" } else { set so_extension "so" set so_flag "-shared" |