Hi Erik,

Many thanks for jumping on this!

On 16/10/2013 12:30 AM, Erik Joelsson wrote:
Currently the RMI stubs in the jdk are built with the newly built rmic
binary at the end of the build. This patch changes that and instead
builds a bootstrap version of the rmic classes, much like bootstrap
javac in langtools, which runs on the bootjdk, but generates classes for
the new jdk. The new solution is more friendly to cross compilation.

A few notes on the patch:

* In src/share/classes/sun/tools/tree/Node.java, I had to change a call
to a jdk8 only constructor in java.lang.InternalError.

A better fix to preserve the cause is:

throw new InternalError().initCause(e);

* The packages included when compiling rmic were just picked by
extending for each missing class until the compilation succeeded. If
someone knows of a crucial package or class that needs to be included,
please say so.
* I renamed a parameter to SetupJavaCompilation. I do not consider the
parameter a hack anymore, but a necessary option for this case.

So should "Don't use this. " say "Use with care." or something like that? :)

* In RMICompilation, the dependency file is now a real touch file
instead of a virtual one. This was needed for proper dependencies in
GenerateClasses.gmk.
* All of corba is compiled twice since I have no idea which parts would
actually be needed. This doesn't add much build time since it can be run
effectively in parallel with the rest of the corba build.

I don't understand the need for changes here given that this is Java compilation and it is already using GENERATE_OLDBYTECODE ??

* I put the compilation of bootstrap rmic in GenerateClasses.gmk
directly instead of Tools.gmk. This was to not add much compile time,
since Tools.gmk is included and therefore parsed a lot.

Seems okay - the proof of course is in the building.

Thanks,
David

Bug: https://bugs.openjdk.java.net/browse/JDK-6604021
Webrev: http://cr.openjdk.java.net/~erikj/6604021/webrev.01/

/Erik

Reply via email to