Given an directory x with two source files: - x/a.java public class a extends b { } - x/b.java public class b { } With gcj 4.1.1 it was possible to include x as source patch search dir with -I and compile as follows: $ gcj -C -I x x/a.java With current svn trunk (and ecj1 installed) this gives: $ /usr/local/gcc43/bin/gcj -C -I x x/a.java x/a.java:1: error: b cannot be resolved to a type public class a extends b { } ^ 1 problem (1 error)
I can confirm that. However, I don't know if it's a bug or just luck that it worked before. I think the correct command would be: gcj -C -Ix x/a.java (no space between -I" and "x") This way it works and I think (I'm absolutely not sure) this is the official way.
I didn't realize that -I's argument could be separate, but now I see this in c.opt: I C ObjC C++ ObjC++ Joined Separate -I <dir> Add <dir> to the end of the main include path
Tetsing a patch.
Subject: Bug 30607 Author: tromey Date: Mon Jan 29 21:30:10 2007 New Revision: 121311 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121311 Log: PR java/30607: * jvspec.c (lang_specific_driver): Handle separate -I argument. * lang.opt (-I): Add 'Separate'. Modified: trunk/gcc/java/ChangeLog trunk/gcc/java/jvspec.c trunk/gcc/java/lang.opt
Subject: Bug 30607 Author: tromey Date: Mon Jan 29 21:38:06 2007 New Revision: 121312 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121312 Log: PR java/30607: * jvspec.c (lang_specific_driver): Handle separate -I argument. * lang.opt (-I): Add 'Separate'. Modified: branches/redhat/gcc-4_1-branch-java-merge-20070117/gcc/java/ChangeLog branches/redhat/gcc-4_1-branch-java-merge-20070117/gcc/java/jvspec.c branches/redhat/gcc-4_1-branch-java-merge-20070117/gcc/java/lang.opt
Fix checked in.