Tom Tromey wrote:
> Based on the code, the docs, and the email message for the original
> patch, I'd say that only the `--' form was meant to work. Further, I
> think the single `-' form can't work because it conflicts with the
> global gcc `-b' option.
Why? -bootclasspath doesn't conflict with -b, unless you're
pedantic about the way Posix single-argument options are handled,
and I don't believe gcc is.
More to the point, it works if you put the -C first:
gcj -C -bootclasspath '' hello.java -v
...
gcc version 3.2 20020717 (experimental)
/home/bothner/GNU/install-gcc/lib/gcc-lib/i686-pc-linux-gnu/3.2/jc1
hello.java -quiet -dumpbase hello.java -g1 -version -fbootclasspath=
-fsyntax-only -femit-class-files -o /dev/null
...
Thus you can define javac as an alias for gcj -C, which was the goal.
Now why it doesn't work if you put the -bootclasspath before the -C
is because process_comand in gcc.c processes -b and -V options at the
start of the command line, before doing anything else. This is a crock,
attempting to handle the historical use of -V -b even when the gcc
driver changes incompatibly. I think this should be taken out - it
doesn't even match the documentation.
--
--Per Bothner
[EMAIL PROTECTED] http://www.bothner.com/per/
_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath