aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/lang.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2001-08-16 21:52:14 +0000
committerTom Tromey <tromey@redhat.com>2001-08-16 21:52:14 +0000
commit36c0cfb1c0be44a4b1cce2c7cf95f8b48882c764 (patch)
treef06b613d253e0de5c16d60467024000787675cc3 /gcc/java/lang.c
parent1c4114883a1d8733ae30e2bc4ba66fe0c38ea61f (diff)
* jcf-dump.c (main): Updated for change to jcf_path_seal.
* gjavah.c (main): Updated for change to jcf_path_seal. * lang.c (version_flag): New global. (java_decode_option): Recognize `-version'. (java_init): Update for change to jcf_path_seal. * jcf.h (jcf_path_seal): Added `print' argument. * jcf-path.c (jcf_path_seal): Added `print' argument. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@44946 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/lang.c')
-rw-r--r--gcc/java/lang.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/java/lang.c b/gcc/java/lang.c
index b9cb0fea7b6..dd997a50336 100644
--- a/gcc/java/lang.c
+++ b/gcc/java/lang.c
@@ -150,6 +150,9 @@ int flag_force_classes_archive_check;
be tested alone, use STATIC_CLASS_INITIALIZATION_OPTIMIZATION_P instead. */
int flag_optimize_sci = 1;
+/* When non zero, print extra version information. */
+static int version_flag = 0;
+
/* 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
@@ -236,6 +239,13 @@ java_decode_option (argc, argv)
{
char *p = argv[0];
+ if (strcmp (p, "-version") == 0)
+ {
+ version_flag = 1;
+ /* We return 0 so that the caller can process this. */
+ return 0;
+ }
+
#define CLARG "-fassume-compiled="
if (strncmp (p, CLARG, sizeof (CLARG) - 1) == 0)
{
@@ -655,7 +665,7 @@ java_init ()
#endif
jcf_path_init ();
- jcf_path_seal ();
+ jcf_path_seal (version_flag);
decl_printable_name = lang_printable_name;
print_error_function = lang_print_error;