Project Proposal: BSD port
volker.simonis at gmail.com
Sat Aug 2 08:14:51 UTC 2008
On 8/2/08, Rob Ross <rob.ross at gmail.com> wrote:
> I'm trying to clarify my understanding of what this means for a Mac-native
> version of OpenJDK.
> One of the implementation details of this project will be, for example, the
> addition of a "BSD" directory under .../jdk/src/, to go along with the
> existing "linux", "solaris", "windows", folders.
> Is this correct?
I think this is a crucial question and the answer is not as clear as
it may seem at a first glance. The problem is, that currently the
"linux" directory contains only the Linux man-pages while the
"solaris" directory contains all the "*nix" coding. While Linux and
Solaris obviously share a great amount of code, the differences
between the systems are factored out by numerous "ifdef" cascades.
There are also a lot of places in the code which implicitely assume
that the code is onlycompiled on Solaris and Linux (e.g. "ifndef
SOLARIS" is used as a marker for Linux).
Now that many new ports are created, I think this code organization
should be seriously reconsidered, because:
- if every port just changes the existing "solaris" source tree and
inserts just one more cascade of platform specific macros it will
become impossible to merge two or more of these ports together (i.e.
to have one source repository which builds on every supported
platform). But I think t his must be the final goal - having one
source repository which contains as many ports as possible.
- if every port makes a copy of the current solaris directory (i.e.
the "bsd" directory in this context) this would make merging different
ports easier. But it would also lead to a considerable amount of code
duplication and maintaining the new ports would be a nightmare,
because any changes to the original "solaris" directory, would have to
be integrated in all the copies for the different ports.
So in my opinion, the right way to go would be to factor out the
common "*nix" code into a generic, say "Posix" directory and let the
different platform directories ("solaris", "linix", "bsd", "haiku",
...) only contain the differences with regard to the common "Posix"
directory (much like the "hotspot" directory is organized into a
"shared", "cpu", "os" and "os_cpu" part).
The drawback of this solution is that it would require a considerable
amount of work (and a lot of work from Sun) because the code for the
Solaris and Linux ports would have to be changed.
Probably it would be wise, if the porters group would sponsor such an
effort in the first place, if it is really interested in having many
stable platform ports in the future.
> So one could download OpenJDK and build it on a Mac (with the suitable
> hardware and OS version), and run it there as well? But this would be
> totally in "unix" land, e.g., using X11 for the UI, BSD libraries for the
> system calls, etc?
> Is this correct?
> If so, what would be the logical next steps (after this project has a stable
> build) in order to add a native Mac OS X port to the OpenJDK, using for
> example, native Cocoa code (or Core Graphics?) for rendering the UI?
> Rob Ross, Lead Software Engineer
> E! Networks
> "Beware of he who would deny you access to information, for in his heart he
> dreams himself your master." -- Commissioner Pravin Lal
> On Aug 1, 2008, at 11:27 AM, Dalibor Topic wrote:
> > In accordance with the OpenJDK guidelines for projects ,
> > I hereby propose on behalf of Greg Lewis, Kurt Miller and Landon Fuller
> > an OpenJDK Project "BSD port of OpenJDK".
> > This Project will be used for the development of a port of OpenJDK to
> > the BSD family of operating systems, including FreeBSD, OpenBSD, NetBSD
> > and MacOS X..
> > I propose this project be sponsored by the Porters Group  and
> > that I be the initial moderator of the project.
> > cheers,
> > dalibor topic
> >  http://openjdk.java.net/projects/
> > 
> >  http://openjdk.java.net/groups/porters/
> > --
> > Dalibor Topic Tel: (+49 40) 23 646 738
> > Java F/OSS Ambassador AIM: robiladonaim
> > Sun Microsystems GmbH Mobile: (+49 177) 2664 192
> > Nagelsweg 55 http://openjdk.java.net
> > D-20097 Hamburg mailto:Dalibor.Topic at sun.com
> > Sitz der Gesellschaft: Sonnenallee 1, D-85551 Kirchheim-Heimstetten
> > Amtsgericht München: HRB 161028
> > Geschäftsführer: Thomas Schröder, Wolfgang Engels, Dr. Roland Bömer
> > Vorsitzender des Aufsichtsrates: Martin Häring
More information about the discuss