aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2005-05-12 01:27:15 +0000
committerTom Tromey <tromey@gcc.gnu.org>2005-05-12 01:27:15 +0000
commitcca1655eabb86897dc2dfd5aa2830d07a1cc83ca (patch)
tree9f39fff82022b1ead94d585a390edb4a4f526870 /gcc
parentcd0b240bf1f795586b644f25b70454ee89eab8b8 (diff)
downloadgcc-cca1655eabb86897dc2dfd5aa2830d07a1cc83ca.zip
gcc-cca1655eabb86897dc2dfd5aa2830d07a1cc83ca.tar.gz
gcc-cca1655eabb86897dc2dfd5aa2830d07a1cc83ca.tar.bz2
gcj.texi (Code Generation): Document -fbootstrap-classes.
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. From-SVN: r99604
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 5da6834..126e0c8 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 204a674..a74e518 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 b5fc57a..3b2f12e 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 562006c..0142915 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