aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/lang.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/java/lang.c')
-rw-r--r--gcc/java/lang.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/java/lang.c b/gcc/java/lang.c
index 91f89be08e6..b9cb0fea7b6 100644
--- a/gcc/java/lang.c
+++ b/gcc/java/lang.c
@@ -146,6 +146,10 @@ int flag_extraneous_semicolon;
/* When non zero, always check for a non gcj generated classes archive. */
int flag_force_classes_archive_check;
+/* When zero, don't optimize static class initialization. This flag shouldn't
+ be tested alone, use STATIC_CLASS_INITIALIZATION_OPTIMIZATION_P instead. */
+int flag_optimize_sci = 1;
+
/* Table of language-dependent -f options.
STRING is the option name. VARIABLE is the address of the variable.
ON_VALUE is the value to store in VARIABLE
@@ -295,6 +299,15 @@ java_decode_option (argc, argv)
}
#undef ARG
+#undef ARG
+#define ARG "-fno-optimize-static-class-initialization"
+ if (strncmp (p, ARG, sizeof (ARG) - 1) == 0)
+ {
+ flag_optimize_sci = 0;
+ return 1;
+ }
+#undef ARG
+
if (p[0] == '-' && p[1] == 'f')
{
/* Some kind of -f option.