This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: FYI: PR java/30607
- From: Tom Tromey <tromey at redhat dot com>
- To: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Cc: GCJ-patches <java-patches at gcc dot gnu dot org>
- Date: 29 Jan 2007 11:44:25 -0700
- Subject: Patch: FYI: PR java/30607
- Reply-to: tromey at redhat dot com
I'm checking this in.
PR java/30607 is a 4.3 regression that happens when an option of the
form '-I foo' is used. I somehow never realized that the -I argument
could be separate, but sure enough, there it is in c.opt.
This patch fixes the bug by changing gcj to allow a separate -I
argument as well.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
PR java/30607:
* jvspec.c (lang_specific_driver): Handle separate -I argument.
* lang.opt (-I): Add 'Separate'.
Index: jvspec.c
===================================================================
--- jvspec.c (revision 121301)
+++ jvspec.c (working copy)
@@ -305,7 +305,7 @@
else if (argv[i][1] == 'O')
saw_O = 1;
else if ((argv[i][2] == '\0'
- && strchr ("bBVDUoeTuIYmLiA", argv[i][1]) != NULL)
+ && strchr ("bBVDUoeTuIYmLiAI", argv[i][1]) != NULL)
|| strcmp (argv[i], "-Tdata") == 0
|| strcmp (argv[i], "-MT") == 0
|| strcmp (argv[i], "-MF") == 0)
@@ -518,7 +518,17 @@
if (argv[i][1] == 'I')
{
- jcf_path_include_arg (&argv[i][2]);
+ const char *arg;
+ if (argv[i][2] == '\0')
+ {
+ gcc_assert (i + 1 < argc && (args[i + 1] & PARAM_ARG) != 0);
+ arg = argv[i + 1];
+ /* Drop the argument. */
+ ++i;
+ }
+ else
+ arg = &argv[i][2];
+ jcf_path_include_arg (arg);
--j;
continue;
}
Index: lang.opt
===================================================================
--- lang.opt (revision 121301)
+++ lang.opt (working copy)
@@ -26,7 +26,7 @@
Java
I
-Java Joined
+Java Joined Separate
; Documented for C
M