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