[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gcj -bootclasspath doesn't work anymore?
From: |
Per Bothner |
Subject: |
Re: gcj -bootclasspath doesn't work anymore? |
Date: |
Wed, 04 Sep 2002 11:04:11 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020814 |
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
address@hidden http://www.bothner.com/per/