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&nbsp; 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&#39;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">&lt;<a href="mailto:gnu_andrew@member.fsf.org">gnu_andrew@member.fsf.org</a>&gt;</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 &lt;<a href="mailto:mvfranz@gmail.com">mvfranz@gmail.com</a>&gt;:<br>

<div class="Ih2E3d">&gt; Hi,<br>
&gt;<br>
&gt; I have been trying to find documentation on how the bootstrap build works on<br>
&gt; IcedTea, but have not found it. &nbsp;I have tried to read the Makefile, but I<br>
&gt; must admit I am not that proficient with makefiles.<br>
&gt;<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&#39;re<br>
looking at just what comes from a Mercurial checkout or a tarball,<br>
it&#39;ll not make a lot of sense...<br>
<div class="Ih2E3d"><br>
&gt; If there is no documentation, perhaps answers to these question will help<br>
&gt; me.<br>
<br>
</div>If you couldn&#39;t find any, what there is is too well hidden...<br>
<div class="Ih2E3d"><br>
&gt;<br>
&gt; 1. How many passes (full compilations) are there done on the source before<br>
&gt; the final jdk is complete?<br>
<br>
</div>By default, 2. &nbsp;OpenJDK is built once with the system JDK. &nbsp;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&#39;t know of anyone trying to build<br>
with that and whether that also needs a JDK to build too). &nbsp;This<br>
applies some additional patches (located in patches/ecj) which disable<br>
a few things, remove some Sun-specific assumptions, etc. &nbsp;Sorry to be<br>
a bit vague, but we probably do need to go through the patch to see<br>
what&#39;s in there and what&#39;s still needed.<br>
<br>
The built JDK is then tested by being used to build OpenJDK. &nbsp;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). &nbsp;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>
&gt; 2. How much (if any) of the source that is being built is compiled and put<br>
&gt; 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. &nbsp;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&#39;s in the spec.). &nbsp;These are added to rt-closed.jar (the<br>
naming is from the OpenJDK build assuming this is an existing<br>
proprietary JDK IIRC). &nbsp;What is included has been found by trial and<br>
error. &nbsp;For instance, javax/script was recently added to the list as<br>
it&#39;s needed by newer versions of HotSpot. &nbsp;The list can be found as<br>
ICEDTEA_COPY_DIRS in Makefile.am:<br>
<br>
# Sources copied from OpenJDK.<br>
ICEDTEA_COPY_DIRS = \<br>
 &nbsp; &nbsp; &nbsp; &nbsp;com/sun/jdi \<br>
 &nbsp; &nbsp; &nbsp; &nbsp;com/sun/jdi/connect \<br>
 &nbsp; &nbsp; &nbsp; &nbsp;com/sun/jdi/connect/spi \<br>
 &nbsp; &nbsp; &nbsp; &nbsp;com/sun/jdi/event \<br>
 &nbsp; &nbsp; &nbsp; &nbsp;com/sun/jdi/request \<br>
 &nbsp; &nbsp; &nbsp; &nbsp;com/sun/jmx/snmp/agent \<br>
 &nbsp; &nbsp; &nbsp; &nbsp;com/sun/tools/jdi \<br>
 &nbsp; &nbsp; &nbsp; &nbsp;java/io \<br>
 &nbsp; &nbsp; &nbsp; &nbsp;java/util \<br>
 &nbsp; &nbsp; &nbsp; &nbsp;java/rmi \<br>
 &nbsp; &nbsp; &nbsp; &nbsp;sun/awt/ \<br>
 &nbsp; &nbsp; &nbsp; &nbsp;javax/net/ssl<br>
<br>
if WITH_ALT_HSBUILD<br>
ICEDTEA_COPY_DIRS += \<br>
 &nbsp; &nbsp; &nbsp; &nbsp;javax/script<br>
endif<br>
<br>
This is from IcedTea6. &nbsp;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>
&gt; 3. Is rt-closed.jar all that should be needed to compile the JDK the first<br>
&gt; time?<br>
<br>
</div>Yes, as explained above.<br>
<div class="Ih2E3d"><br>
&gt; 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. &nbsp;The results are in<br>
openjdk/control/build/${OS}-${ARCH}/j2sdk-image (omit the &#39;control&#39;<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>
&gt;<br>
&gt; Thanks<br>
&gt;<br>
&gt; Michael<br>
&gt;<br>
&gt;<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 &nbsp;7927 142C 2591 94EF D9D8<br>
</blockquote></div><br>