RFC: Multiple Java Source Files - Combine Inputs By Default

Andrew Haley aph@redhat.com
Mon Jun 21 10:48:00 GMT 2004


Ranjit Mathew writes:
 > 
 > If I use "-o" with "-c" like:
 > 
 > gcj -c -o snafu foo.java bar.java baz.java
 > 
 > my understanding is that GCC will create file "snafu"
 > that contains *one* of what would have been "foo.o",
 > "bar.o" and "baz.o".
That is not my understanding.
 > And my understanding of "combine inputs" in GCJ
 > is that it is merely a way of accepting multiple
 > source/class files in one invocation in the days before 
 > the "--combine" flag in GCC (for IMA?) came into being.
Yes.
 > So they seem orthogonal to me, unless I'm missing
 > something (since I haven't read through the code
 > that properly).
Yes, I think that's true.
 > Simply put, what I'm saying is that the effect of:
 > 
 > gcj --main=Foo Foo.java Bar.java
 > 
 > and
 > 
 > gcj -o snafu --main=Foo Foo.java Bar.java
 > 
 > can possibly be different currently (apart from "a.out" v/s 
 > "snafu" as the output file), and inconsistent even, leading to
 > the user getting confused.
That sounds like a bug. The -o argument should only affect the output
of a compiler invocation with -c or -S.
Andrew.


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /