This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFC: Multiple Java Source Files - Combine Inputs By Default


Hi,

  Per enabled "compiling multiple files at once" support to jc1:

  http://gcc.gnu.org/ml/java/2001-02/msg00058.html

However, for "normal" gcj invocations like:

  gcj --main=Foo Foo.java Bar.java

this is not done unless one uses the "-o" option as well.

This is because:
------------------------- jvspec.c -------------------------
    443   if ((saw_o && java_files_count + class_files_count +
zip_files_count > 1)
    444       || (saw_C && java_files_count > 1)
    445       || (indirect_files_count > 0
    446           && java_files_count + class_files_count +
zip_files_count > 0))
    447     combine_inputs = 1;
------------------------- jvspec.c -------------------------

This might seem trivial, but this causes different code
paths to be taken (and thus possibly different behaviour due
to bugs) depending on whether the user specified "-o" or
not. For an example, see:

  http://gcc.gnu.org/ml/gcc-patches/2004-06/msg01589.html

I suggest that we remove the dependency on "-o" and always
combine input java sources/classes.

Per, is there any particular reason you added that extra
check (shown above)?

Ranjit.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]