Andrew,<br><br>This is very helpful. The question I have is about patches.<br><br>1. Why do so many patches fail?<br><br>Is it because the patches target the OpenJDK and updates to Open JDK break the icedtea patches?<br><br>
Should I go ahead and try to make them all resolve?<br><br>2. It seems that there are tons of makefile changes and such brewing on the bsd-ports list that might help us on Mac OS X. What is the mechanism for these to flow into Icedtea?<br>
<br>3. Are there some simple tasks I can do such as patch diffs or something on patches that won't apply?<br><br>Thanks,<br>Eric<br><br><div class="gmail_quote">On Tue, Jan 13, 2009 at 8:35 PM, Andrew John Hughes <span dir="ltr"><<a href="mailto:gnu_andrew@member.fsf.org">gnu_andrew@member.fsf.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">2009/1/14 Michael Franz <<a href="mailto:mvfranz@gmail.com">mvfranz@gmail.com</a>>:<br>
<div class="Ih2E3d">> Hi,<br>
><br>
> I have been trying to find documentation on how the bootstrap build works on<br>
> IcedTea, but have not found it. I have tried to read the Makefile, but I<br>
> must admit I am not that proficient with makefiles.<br>
><br>
<br>
</div>That would be a little difficult, given most of the makefiles are part<br>
of the OpenJDK build which is downloaded by IcedTea i.e. if you're<br>
looking at just what comes from a Mercurial checkout or a tarball,<br>
it'll not make a lot of sense...<br>
<div class="Ih2E3d"><br>
> If there is no documentation, perhaps answers to these question will help<br>
> me.<br>
<br>
</div>If you couldn't find any, what there is is too well hidden...<br>
<div class="Ih2E3d"><br>
><br>
> 1. How many passes (full compilations) are there done on the source before<br>
> the final jdk is complete?<br>
<br>
</div>By default, 2. OpenJDK is built once with the system JDK. This is<br>
assumed to be gcj/ecj or some other GNU Classpath variant as these are<br>
the only Free options other than IcedTea/OpenJDK itself (saying that,<br>
I suppose there is Harmony but I don't know of anyone trying to build<br>
with that and whether that also needs a JDK to build too). This<br>
applies some additional patches (located in patches/ecj) which disable<br>
a few things, remove some Sun-specific assumptions, etc. Sorry to be<br>
a bit vague, but we probably do need to go through the patch to see<br>
what's in there and what's still needed.<br>
<br>
The built JDK is then tested by being used to build OpenJDK. If you<br>
already have IcedTea (say from your distro), you can skip straight to<br>
this stage using --with-icedtea and --with-icedtea-home to specify a<br>
path to your existing IcedTea installation if the default is no good<br>
(these two options should be combined IMO). The system IcedTea needs<br>
to be fairly new as some IcedTea plugin stuff is assumed to be<br>
presented AFAIR.<br>
<br>
The alternate builds (zero assembler, shark, cacao) follow the same<br>
process; their alterations primarily affect HotSpot.<br>
<div class="Ih2E3d"><br>
> 2. How much (if any) of the source that is being built is compiled and put<br>
> into the rt-closed.jar?<br>
<br>
</div>An ecj step before the OpenJDK build compiles enough of the OpenJDK<br>
sources separately to satisfy the OpenJDK build. The OpenJDK build is<br>
designed only for Sun JDKs it seems, and so relies on a lot of<br>
Sun-specific classes being present in the build JDK (far over and<br>
above what's in the spec.). These are added to rt-closed.jar (the<br>
naming is from the OpenJDK build assuming this is an existing<br>
proprietary JDK IIRC). What is included has been found by trial and<br>
error. For instance, javax/script was recently added to the list as<br>
it's needed by newer versions of HotSpot. The list can be found as<br>
ICEDTEA_COPY_DIRS in Makefile.am:<br>
<br>
# Sources copied from OpenJDK.<br>
ICEDTEA_COPY_DIRS = \<br>
com/sun/jdi \<br>
com/sun/jdi/connect \<br>
com/sun/jdi/connect/spi \<br>
com/sun/jdi/event \<br>
com/sun/jdi/request \<br>
com/sun/jmx/snmp/agent \<br>
com/sun/tools/jdi \<br>
java/io \<br>
java/util \<br>
java/rmi \<br>
sun/awt/ \<br>
javax/net/ssl<br>
<br>
if WITH_ALT_HSBUILD<br>
ICEDTEA_COPY_DIRS += \<br>
javax/script<br>
endif<br>
<br>
This is from IcedTea6. Note that the SNMP stuff is stubbed, and<br>
should probably just be removed and IMPORT_BINARY_PLUGS=false set on<br>
the OpenJDK build.<br>
<div class="Ih2E3d"><br>
> 3. Is rt-closed.jar all that should be needed to compile the JDK the first<br>
> time?<br>
<br>
</div>Yes, as explained above.<br>
<div class="Ih2E3d"><br>
> 4. What is the expected results of a successful bootstrap?<br>
<br>
</div>A fully-compliant 1.6 JDK? :)<br>
You should get:<br>
<br>
IcedTea is served.<br>
<br>
when you reach the end. The results are in<br>
openjdk/control/build/${OS}-${ARCH}/j2sdk-image (omit the 'control'<br>
segment on IcedTea7).<br>
<br>
The easiest way to try a pain-free build is to try it on Fedora where<br>
it should just ./configure and make.<br>
<br>
><br>
> Thanks<br>
><br>
> Michael<br>
><br>
><br>
<br>
Thanks,<br>
--<br>
Andrew :-)<br>
<br>
Support Free Java!<br>
Contribute to GNU Classpath and the OpenJDK<br>
<a href="http://www.gnu.org/software/classpath" target="_blank">http://www.gnu.org/software/classpath</a><br>
<a href="http://openjdk.java.net" target="_blank">http://openjdk.java.net</a><br>
<br>
PGP Key: 94EFD9D8 (<a href="http://subkeys.pgp.net" target="_blank">http://subkeys.pgp.net</a>)<br>
Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8<br>
</blockquote></div><br>