Commit 3d3707c1 by Tom Tromey Committed by Tom Tromey

For PR java/6314:

	* jvspec.c (lang_specific_driver): Use --resource, not -R.  Also
	recognize `-fcompile-resource='.
	* gcj.texi (Invoking gcj): Use --resource, not -R.  Expanded text
	a bit.

From-SVN: r52690
parent 50cb2154
2002-04-23 Tom Tromey <tromey@redhat.com>
For PR java/6314:
* jvspec.c (lang_specific_driver): Use --resource, not -R. Also
recognize `-fcompile-resource='.
* gcj.texi (Invoking gcj): Use --resource, not -R. Expanded text
a bit.
2002-04-22 Alexandre Petit-Bianco <apbianco@redhat.com> 2002-04-22 Alexandre Petit-Bianco <apbianco@redhat.com>
* jcf-parse.c: (yyparse): Don't prepend "./" to relative * jcf-parse.c: (yyparse): Don't prepend "./" to relative
......
...@@ -150,7 +150,7 @@ gcj [@option{-I}@var{dir}@dots{}] [@option{-d} @var{dir}@dots{}] ...@@ -150,7 +150,7 @@ gcj [@option{-I}@var{dir}@dots{}] [@option{-d} @var{dir}@dots{}]
[@option{--CLASSPATH}=@var{path}] [@option{--classpath}=@var{path}] [@option{--CLASSPATH}=@var{path}] [@option{--classpath}=@var{path}]
[@option{-f}@var{option}@dots{}] [@option{--encoding}=@var{name}] [@option{-f}@var{option}@dots{}] [@option{--encoding}=@var{name}]
[@option{--main}=@var{classname}] [@option{-D}@var{name}[=@var{value}]@dots{}] [@option{--main}=@var{classname}] [@option{-D}@var{name}[=@var{value}]@dots{}]
[@option{-C}] [@option{-R} @var{resource-name}] [@option{-d} @var{directory}] [@option{-C}] [@option{--resource} @var{resource-name}] [@option{-d} @var{directory}]
[@option{-W}@var{warn}@dots{}] [@option{-W}@var{warn}@dots{}]
@var{sourcefile}@dots{} @var{sourcefile}@dots{}
@c man end @c man end
...@@ -213,7 +213,7 @@ in which case they will all be compiled. If you specify a ...@@ -213,7 +213,7 @@ in which case they will all be compiled. If you specify a
option, all the input files will be compiled together, producing a option, all the input files will be compiled together, producing a
single output file, named @var{FILENAME}. single output file, named @var{FILENAME}.
This is allowed even when using @code{-S} or @code{-c}, This is allowed even when using @code{-S} or @code{-c},
but not when using @code{-C} or @code{-R}. but not when using @code{-C} or @code{--resource}.
(This is an extension beyond the what plain @command{gcc} allows.) (This is an extension beyond the what plain @command{gcc} allows.)
(If more than one input file is specified, all must currently (If more than one input file is specified, all must currently
be @code{.java} files, though we hope to fix this.) be @code{.java} files, though we hope to fix this.)
...@@ -387,10 +387,14 @@ using the @code{java.lang.System.getProperty} method. ...@@ -387,10 +387,14 @@ using the @code{java.lang.System.getProperty} method.
This option is used to tell @command{gcj} to generate bytecode This option is used to tell @command{gcj} to generate bytecode
(@file{.class} files) rather than object code. (@file{.class} files) rather than object code.
@item -R @var{resource-name} @item --resource @var{resource-name}
This option is used to tell @command{gcj} to compile the contents of a This option is used to tell @command{gcj} to compile the contents of a
given file to object code so it may be accessed at runtime with the core given file to object code so it may be accessed at runtime with the core
protocol handler as @var{core:/resource-name}. protocol handler as @samp{core:/@var{resource-name}}. Note that
@var{resource-name} is the name of the resource as found at runtime; for
instance, it could be used in a call to @code{ResourceBundle.getBundle}.
The actual file name to be compiled this way must be specified
separately.
@item -d @var{directory} @item -d @var{directory}
When used with @code{-C}, this causes all generated @file{.class} files When used with @code{-C}, this causes all generated @file{.class} files
......
...@@ -210,8 +210,8 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries) ...@@ -210,8 +210,8 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries)
int saw_libgcj ATTRIBUTE_UNUSED = 0; int saw_libgcj ATTRIBUTE_UNUSED = 0;
#endif #endif
/* Saw -R, -C or -o options, respectively. */ /* Saw --resource, -C or -o options, respectively. */
int saw_R = 0; int saw_resource = 0;
int saw_C = 0; int saw_C = 0;
int saw_o = 0; int saw_o = 0;
...@@ -303,13 +303,12 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries) ...@@ -303,13 +303,12 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries)
library = 0; library = 0;
will_link = 0; will_link = 0;
} }
else if (strcmp (argv[i], "-R") == 0) else if (strncmp (argv[i], "-fcompile-resource=", 19) == 0)
{ {
saw_R = 1; saw_resource = 1;
quote = argv[i];
want_spec_file = 0; want_spec_file = 0;
if (library != 0) if (library != 0)
added -= 2; --added;
library = 0; library = 0;
will_link = 0; will_link = 0;
} }
...@@ -382,7 +381,7 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries) ...@@ -382,7 +381,7 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries)
continue; continue;
} }
if (saw_R) if (saw_resource)
{ {
args[i] |= RESOURCE_FILE_ARG; args[i] |= RESOURCE_FILE_ARG;
last_input_index = i; last_input_index = i;
...@@ -430,10 +429,10 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries) ...@@ -430,10 +429,10 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries)
fatal ("`%s' is not a valid class name", main_class_name); fatal ("`%s' is not a valid class name", main_class_name);
num_args = argc + added; num_args = argc + added;
if (saw_R) if (saw_resource)
{ {
if (! saw_o) if (! saw_o)
fatal ("-R requires -o"); fatal ("--resource requires -o");
} }
if (saw_C) if (saw_C)
{ {
...@@ -514,15 +513,6 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries) ...@@ -514,15 +513,6 @@ lang_specific_driver (in_argc, in_argv, in_added_libraries)
arglist[j] = "-xnone"; arglist[j] = "-xnone";
} }
if (strcmp (argv[i], "-R") == 0)
{
arglist[j] = concat ("-fcompile-resource=",
*argv[i+1] == '/' ? "" : "/",
argv[i+1], NULL);
i++;
continue;
}
if (strcmp (argv[i], "-classpath") == 0 if (strcmp (argv[i], "-classpath") == 0
|| strcmp (argv[i], "-bootclasspath") == 0 || strcmp (argv[i], "-bootclasspath") == 0
|| strcmp (argv[i], "-CLASSPATH") == 0) || strcmp (argv[i], "-CLASSPATH") == 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment