summaryrefslogtreecommitdiff
path: root/gcc/java/jvspec.c
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>1999-10-15 16:45:31 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>1999-10-15 16:45:31 +0000
commitd25efa9c2efb1fea23f948c1b8d682e1021fde7e (patch)
tree1bcb57fa5b0f05e8d67699b59b7d8b9928c4b89a /gcc/java/jvspec.c
parentcd75cb43fc02da5db9db71316dd7839bcd656ff4 (diff)
downloadgcc-d25efa9c2efb1fea23f948c1b8d682e1021fde7e.tar.gz
* jvgenmain.c (usage): New function.
(main): Use it. Also, handle `-D' options. * jvspec.c (lang_specific_driver): Recognize -D. (jvgenmain_spec): Added `%{D*}' to jvgenmain invocation. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30019 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/jvspec.c')
-rw-r--r--gcc/java/jvspec.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/java/jvspec.c b/gcc/java/jvspec.c
index 87d893d9747..d4dde5e4635 100644
--- a/gcc/java/jvspec.c
+++ b/gcc/java/jvspec.c
@@ -50,7 +50,7 @@ int lang_specific_extra_outfiles = 0;
#define COMBINE_INPUTS 0
const char jvgenmain_spec[] =
- "jvgenmain %i %{!pipe:%umain.i} |\n\
+ "jvgenmain %{D*} %i %{!pipe:%umain.i} |\n\
cc1 %{!pipe:%Umain.i} %1 \
%{!Q:-quiet} -dumpbase %b.c %{d*} %{m*} %{a*}\
%{g*} %{O*} \
@@ -163,6 +163,9 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries)
int saw_O = 0;
int saw_g = 0;
+ /* Saw a `-D' option. */
+ int saw_D = 0;
+
/* An array used to flag each argument that needs a bit set for
LANGSPEC, MATHLIB, WITHLIBC, or GCLIB. */
int *args;
@@ -247,6 +250,8 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries)
library = 0;
will_link = 0;
}
+ else if (argv[i][1] == 'D')
+ saw_D = 1;
else if (argv[i][1] == 'g')
saw_g = 1;
else if (argv[i][1] == 'O')
@@ -331,6 +336,9 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries)
if (quote)
fatal ("argument to `%s' missing\n", quote);
+ if (saw_D && ! main_class_name)
+ fatal ("can't specify `-D' without `--main'\n");
+
num_args = argc + added;
if (saw_C)
{