Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: OpenJDK binaries

On Sat 28 Feb 2009 at 10:32:42 -0500, Christos Zoulas wrote:
> On Feb 28,  1:18pm, (Rhialto) wrote:
> -- Subject: Re: OpenJDK binaries
> | On Fri 27 Feb 2009 at 20:06:49 +0000, Christos Zoulas wrote:
> | > Install the required packages
> | >   * build and install java1.6 from pkgsrc 
> | 
> | I never understood why you need Java to build Java, especially given
> | that the bytecode interpreter appears to be written in C++ (at least
> | Sun's). (In fact it can't be written in Java otherwise who'd interpret
> | its bytecode?) So the bootstrapping process could easily work the
> | standard way: build the bytecode interpreter, and use it to run any Java
> | code that is required later on in the build process. Somehow I expect
> | that the fact that it isn't so, is a deliberate complication by Sun.
> Because the compiler is written in java and the runtime needs to have a
> the compiled java code to run.

Well, that doesn't need a fully working java installation then (but just
a part of it that doesn't even need to be installed)?

The bytecode interpreter (and any native interfaces) can be built first
with just C++; it can be used to run the bytecode of the (older)
compiler *only*, to compile the compiler, and then bootstrap the rest.

That is more or less how the lang/cdl3 package works (althoug it is
simpler, since cdl3 compiles to C instead of bytecode, so just the C
version of the compiler needs to be included, which can then do a
standard 3-stage bootstrap).

I've seen a BCPL compiler and an Algol 68 compiler according to such
schemes as well (bytecode and C, respectively).

> christos
___ Olaf 'Rhialto' Seibert    -- You author it, and I'll reader it.
\X/ rhialto/at/      -- Cetero censeo "authored" delendum esse.

Home | Main Index | Thread Index | Old Index