summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-12 01:27:15 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-12 01:27:15 +0000
commitfffadcfa2f45575f6a4f5d68fb8f7c3ef732d794 (patch)
tree9f39fff82022b1ead94d585a390edb4a4f526870 /gcc
parent9508132a0f3d625ed0b5e8fc2f4f65faa18d2160 (diff)
downloadgcc-fffadcfa2f45575f6a4f5d68fb8f7c3ef732d794.tar.gz
gcc/java:
* gcj.texi (Code Generation): Document -fbootstrap-classes. * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro. (parse_version): Use it. * lang.opt (-fbootstrap-classes): New option. libjava: * external/w3c_dom/Makefile.in: Rebuilt. * external/w3c_dom/Makefile.am (libw3c_gcj_la_GCJFLAGS): Added -fbootstrap-classes. * external/sax/Makefile.in: Rebuilt. * external/sax/Makefile.am (libsax_gcj_la_GCJFLAGS): Added -fbootstrap-classes. * java/lang/Class.h (_Jv_CopyClassesToSystemLoader): Declare as friend. * java/lang/natVMClassLoader.cc (getSystemClassLoaderInternal): Call _Jv_CopyClassesToSystemLoader. * java/lang/natClassLoader.cc (system_class_list): New global. (_Jv_RegisterClassHookDefault): Handle bootstrap and system classes differently. (_Jv_CopyClassesToSystemLoader): New function. (SYSTEM_LOADER_INITIALIZED): New define. * include/jvm.h (GCJ_BOOTSTRAP_LOADER_ADDITION): New define. (_Jv_CheckABIVersion): Use it. (_Jv_ClassForBootstrapLoader): New function. * Makefile.in: Rebuilt. * Makefile.am (AM_GCJFLAGS): Added -fbootstrap-classes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99604 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/java/ChangeLog7
-rw-r--r--gcc/java/decl.c6
-rw-r--r--gcc/java/gcj.texi9
-rw-r--r--gcc/java/lang.opt4
4 files changed, 26 insertions, 0 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 5da68340ad3..126e0c836ee 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,10 @@
+2005-05-11 Tom Tromey <tromey@redhat.com>
+
+ * gcj.texi (Code Generation): Document -fbootstrap-classes.
+ * decl.c (GCJ_BOOTSTRAP_LOADER_ADDITION): New macro.
+ (parse_version): Use it.
+ * lang.opt (-fbootstrap-classes): New option.
+
2005-05-10 Paolo Bonzini <bonzini@gnu.org>
PR java/21436
diff --git a/gcc/java/decl.c b/gcc/java/decl.c
index 204a674b175..a74e5186b7d 100644
--- a/gcc/java/decl.c
+++ b/gcc/java/decl.c
@@ -64,6 +64,10 @@ static void parse_version (void);
/* Used when computing the ABI version. */
#define GCJ_BINARYCOMPAT_ADDITION 5
+/* Used when defining a class that should be loaded by the bootstrap
+ loader. */
+#define GCJ_BOOTSTRAP_LOADER_ADDITION 1
+
/* The version of the BC ABI that we generate. At the moment we are
compatible with what shipped in GCC 4.0. This must be kept in sync
with parse_version(), libgcj, and reality (if the BC format
@@ -620,6 +624,8 @@ parse_version (void)
probably always require strict matching for ordinary ABI. */
if (flag_indirect_dispatch)
abi_version = GCJ_CURRENT_BC_ABI_VERSION;
+ if (flag_bootstrap_classes)
+ abi_version += GCJ_BOOTSTRAP_LOADER_ADDITION;
gcj_abi_version = build_int_cstu (ptr_type_node, abi_version);
}
diff --git a/gcc/java/gcj.texi b/gcc/java/gcj.texi
index b5fc57a170a..3b2f12e57fd 100644
--- a/gcc/java/gcj.texi
+++ b/gcc/java/gcj.texi
@@ -515,6 +515,15 @@ ABI. These restrictions will be lifted in some future release.
However, if you compile CNI code with the standard ABI, you can call
it from code built with the binary compatibility ABI.
+@item -fbootstrap-classes
+This option can be use to tell @code{libgcj} that the compiled classes
+should be loaded by the bootstrap loader, not the system class loader.
+By default, if you compile a class and link it into an executable, it
+will be treated as if it was loaded using the system class loader.
+This is convenient, as it means that things like
+@code{Class.forName()} will search @samp{CLASSPATH} to find the
+desired class.
+
@end table
diff --git a/gcc/java/lang.opt b/gcc/java/lang.opt
index 562006c620d..0142915824f 100644
--- a/gcc/java/lang.opt
+++ b/gcc/java/lang.opt
@@ -176,5 +176,9 @@ fuse-divide-subroutine
Java Var(flag_use_divide_subroutine) Init(1)
Call a library routine to do integer divisions
+fbootstrap-classes
+Java Var(flag_bootstrap_classes)
+Generated should be loaded by bootstrap loader
+
version
Java