aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/jvspec.c
diff options
context:
space:
mode:
authorPer Bothner <bothner@gcc.gnu.org>1999-02-02 02:16:57 -0800
committerPer Bothner <bothner@gcc.gnu.org>1999-02-02 02:16:57 -0800
commit743b0973210c8b39331ecd5f10e2d77f24381321 (patch)
tree1d049ba88ba67736ab46d0b59c4812122dbf10d7 /gcc/java/jvspec.c
parent80d8e475cc1f2bf9b78039a61b7a792dd0da5f33 (diff)
downloadgcc-743b0973210c8b39331ecd5f10e2d77f24381321.zip
gcc-743b0973210c8b39331ecd5f10e2d77f24381321.tar.gz
gcc-743b0973210c8b39331ecd5f10e2d77f24381321.tar.bz2
jcf-write.c (localvar_alloc): Only emit entry for LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE.
0 * jcf-write.c (localvar_alloc): Only emit entry for LocalVariableTable if debug_info_level > DINFO_LEVEL_TERSE. (generate_bytecode_insns): Only call put_linenumber if debug_info_level > DINFO_LEVEL_NONE. * jvspec.c (lang_specific_driver): If no -O* or -g* option is specified, add -g1 (for compatibility wih javac). From-SVN: r24964
Diffstat (limited to 'gcc/java/jvspec.c')
-rw-r--r--gcc/java/jvspec.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/java/jvspec.c b/gcc/java/jvspec.c
index 38d09b2..9aed654 100644
--- a/gcc/java/jvspec.c
+++ b/gcc/java/jvspec.c
@@ -160,6 +160,10 @@ lang_specific_driver (fn, in_argc, in_argv, in_added_libraries)
int saw_C = 0;
int saw_o = 0;
+ /* Saw soem -O* or -g* option, respectively. */
+ int saw_O = 0;
+ int saw_g = 0;
+
/* An array used to flag each argument that needs a bit set for
LANGSPEC, MATHLIB, WITHLIBC, or GCLIB. */
int *args;
@@ -274,6 +278,10 @@ lang_specific_driver (fn, in_argc, in_argv, in_added_libraries)
library = 0;
will_link = 0;
}
+ else if (argv[i][1] == 'g')
+ saw_g = 1;
+ else if (argv[i][1] == 'O')
+ saw_O = 1;
else if (((argv[i][2] == '\0'
&& (char *)strchr ("bBVDUoeTuIYmLiA", argv[i][1]) != NULL)
|| strcmp (argv[i], "-Tdata") == 0))
@@ -389,6 +397,8 @@ lang_specific_driver (fn, in_argc, in_argv, in_added_libraries)
{
lang_specific_extra_outfiles++;
}
+ if (saw_g + saw_O == 0)
+ num_args++;
arglist = (char **) xmalloc ((num_args + 1) * sizeof (char *));
for (i = 0, j = 0; i < argc; i++, j++)
@@ -486,6 +496,10 @@ lang_specific_driver (fn, in_argc, in_argv, in_added_libraries)
}
#endif
+ /* If we saw no -O or -g option, default to -g1, for javac compatibility. */
+ if (saw_g + saw_O == 0)
+ arglist[j++] = "-g1";
+
/* Add `-ljava' if we haven't already done so. */
if (library && ! saw_libjava)
{