This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Can OpenJDK's compiler replace ECJ for GCJ?
- From: Andrew Haley <aph at redhat dot com>
- To: "J.C." <jc-nospam at jr-pizarro dot jazztel dot es>
- Cc: java at gcc dot gnu dot org
- Date: Sun, 3 Dec 2006 12:41:35 +0000
- Subject: Re: Can OpenJDK's compiler replace ECJ for GCJ?
- References: <457294AE.8050106@jr-pizarro.jazztel.es>
J.C. writes:
>
> The OpenJDK's compiler is downloadable from:
> http://www.java.net/download/openjdk/jdk7/promoted/b03/compiler-7-ea-src-b03-30_nov_2006.zip
>
> I think that we can hack the OpenJDK's compiler for >=GCJ-4.2
> because it's GPLed for GPLed software, without legal problem.
>
> The ECJ's licence is not GPLed and it may become in a future problem.
>
> The ECJ's source code can be bloated, redundant, ... and has more KLOCs
> than OpenJDK's compiler.
>
> This OpenJDK's compiler is for very unstable Java-1.7 but is easyly
> strippeable to for Java-1.4.2 (srcode & bytecode) eliminating
> genericity, foreach, etc. It eliminates the complex Java-1.7's bugs
> too.
Er, no. We'd rather not eliminate genericity, thank you very much.
> I believe that if we do hack/strip the OpenJDK's compiler for
> Java-1.4.2 of >=GCJ-4.2 then we win development time,
> maintainability and buggyless.
>
> Will can we fork this GPLed compiler as by example SunGCJ (or SGCJ, or
> JGCJ, GCJinJava, any idea?) specifically for GCJ.
We can, but let's not. Forks are, in general, a Bad Thing.
> If we will find SunGCJ's bugs then we will submit bugs to Sun for
> correcting the OpenJDK. Please, contact to Sun for autorepairing ;).
There's no reason why anyone should not experiment with using Sun's
javac as a front-end for gcj. It would be interesting. It may
eventually prove to be the best choice for gcj.
I don't think that it matters whether we use ecj or Sun's javac. Both
are free Java compilers. We have so far done all our testing with
ecj, which has proved to be a very reliable compiler. I hope that we
can merge the ecj branch to trunk next week.
Andrew.