This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: -D ?
>>>>> "Bryce" == Bryce McKinlay <bryce@waitaki.otago.ac.nz> writes:
>> gcj should only be used for compiling Java
>> code (either .java, .class, or resource files with --resource).
Bryce> Why? It might not be a good idea to compile JNI code with gcj,
Bryce> but it can be very useful to use gcj to compile and link C/C++
Bryce> code into a mixed Java/C++ application. But, it is unfortunate
Bryce> that the -D flag means different things to Java and C code.
We already broke compatibility with -C. Admittedly this isn't useful
in the situation you cite.
I think my bias here is that I'm not used to compiling things that
way. I almost always compile to .o files first.
The problem to me is just one of supportability. I don't think we've
ever advertised this feature. We don't test it (more precisely, I
don't know of anybody testing it). Supporting it means one more place
that we have to watch what happens in the C/C++ front ends to make
sure we don't have problems; this is hard because those front ends are
5x-10x as active as we are.
So in sum to me it seems like it isn't worth the effort.
Still, I don't feel all that strongly about it. We could probably
devise a plan to rehabilitate -D (e.g., nearly-compatible change in
3.2, real change in 3.3).
Tom