Porting: Mac OS X Leopard

View: New views
5 Messages — Rating Filter:   Alert me  

Porting: Mac OS X Leopard

by Landon Fuller-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Given the recent discussion of porting, it was suggested I send this along to the discuss@ list.

I've long wondered what it would take to get the FreeBSD Java Port running on OS X, so this weekend I spent a couple days getting Java 1.6 running on my x86 Leopard machine. I can report partial success -- hotspot compiles, the jre mostly bootstraps, and Hello World runs. Anything complex appears to trigger stack alignment issues (Apple's i386 API requires a 16-byte aligned stack)

landonf@max:javasrc_1_6_jrl/control/build/bsd-i586> ./bin/java -version
java version "1.6.0_03-p3"
Java(TM) SE Runtime Environment (build 1.6.0_03-p3-landonf_04_nov_2007_00_06-b00)
Java HotSpot(TM) Server VM (build 1.6.0_03-p3-landonf_04_nov_2007_01_30-b00, mixed mode)

landonf@max:javasrc_1_6_jrl/control/build/bsd-i586> ./bin/java Hello
Hello World!

Given this, it seems that getting the full JDK running on OS X (using X11, no Aqua) is fairly achievable. I've posted the code, description, etc, here:

Cheers,
-landonf


PGP.sig (193 bytes) Download Attachment

Re: Porting: Mac OS X Leopard

by Peter B. Kessler :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Landon Fuller wrote:

> Given the recent discussion of porting, it was suggested I send this along to the discuss@ list.
>
> I've long wondered what it would take to get the FreeBSD Java Port running on OS X, so this weekend I spent a couple days getting Java 1.6 running on my x86 Leopard machine. I can report partial success -- hotspot compiles, the jre mostly bootstraps, and Hello World runs. Anything complex appears to trigger stack alignment issues (Apple's i386 API requires a 16-byte aligned stack)
>
> landonf@max:javasrc_1_6_jrl/control/build/bsd-i586> ./bin/java -version
> java version "1.6.0_03-p3"
> Java(TM) SE Runtime Environment (build 1.6.0_03-p3-landonf_04_nov_2007_00_06-b00)
> Java HotSpot(TM) Server VM (build 1.6.0_03-p3-landonf_04_nov_2007_01_30-b00, mixed mode)
>
> landonf@max:javasrc_1_6_jrl/control/build/bsd-i586> ./bin/java Hello
> Hello World!
>
> Given this, it seems that getting the full JDK running on OS X (using X11, no Aqua) is fairly achievable. I've posted the code, description, etc, here:
> http://landonf.bikemonkey.org/code/macosx/FreeBSD_Java_16.20071105.html
>
> Cheers,
> -landonf


Great progress!  I note, however that this is work you did on
JDK 1.6 under the JRL, rather than on OpenJDK under the GPLv2.

If you mean to contribute this back to the OpenJDK under the GPLv2,
you'll need to fill out and send back a Sun Contributor Agreement.
You can get that form at

     http://www.sun.com/software/opensource/sca.pdf

and the instructions for sending it to us are at

     http://openjdk.java.net/contribute/

The FAQ for the contrubutor agreement is at

     http://www.sun.com/software/opensource/contributor_agreement.jsp

Thanks for contributing.

                        ... peter

Re: Porting: Mac OS X Leopard

by Landon Fuller-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Nov 5, 2007, at 11:55, Peter B. Kessler wrote:

> Landon Fuller wrote:
>
>> Given the recent discussion of porting, it was suggested I send  
>> this along to the discuss@ list.
>> I've long wondered what it would take to get the FreeBSD Java Port  
>> running on OS X, so this weekend I spent a couple days getting  
>> Java 1.6 running on my x86 Leopard machine. I can report partial  
>> success -- hotspot compiles, the jre mostly bootstraps, and Hello  
>> World runs. Anything complex appears to trigger stack alignment  
>> issues (Apple's i386 API requires a 16-byte aligned stack)
>> landonf@max:javasrc_1_6_jrl/control/build/bsd-i586> ./bin/java -
>> version
>> java version "1.6.0_03-p3"
>> Java(TM) SE Runtime Environment (build 1.6.0_03-p3-
>> landonf_04_nov_2007_00_06-b00)
>> Java HotSpot(TM) Server VM (build 1.6.0_03-p3-
>> landonf_04_nov_2007_01_30-b00, mixed mode)
>> landonf@max:javasrc_1_6_jrl/control/build/bsd-i586> ./bin/java Hello
>> Hello World!
>> Given this, it seems that getting the full JDK running on OS X  
>> (using X11, no Aqua) is fairly achievable. I've posted the code,  
>> description, etc, here:
>> http://landonf.bikemonkey.org/code/macosx/ 
>> FreeBSD_Java_16.20071105.html
>> Cheers,
>> -landonf
>
>
> Great progress!  I note, however that this is work you did on
> JDK 1.6 under the JRL, rather than on OpenJDK under the GPLv2.
Cheers. Since the code is based on FreeBSD's porting work, the  
FreeBSD code would also need to be moved from the JRL to the GPLv2  
(and integrated with OpenJDK).

That's a bit larger in scope than this weekend proof of concept, but  
something I'd love to see happen. =)

-landonf


PGP.sig (193 bytes) Download Attachment

Parent Message unknown Re: Porting: Mac OS X Leopard

by Landon Fuller-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Nov 5, 2007, at 13:08, Greg Lewis wrote:

>> Cheers. Since the code is based on FreeBSD's porting work, the
>> FreeBSD code would also need to be moved from the JRL to the GPLv2
>> (and integrated with OpenJDK).
>>
>> That's a bit larger in scope than this weekend proof of concept, but
>> something I'd love to see happen. =)
>
> There is already a port to OpenJDK and there is work under way to  
> get it
> incorporated into OpenJDK.  I hope to be able to provide more details
> on what is going on there in the near future :).
That sounds super, looking forward to the details -- It would be  
quite fun to work on OpenJDK Darwin (and BSD) support.
Please let me know how/if I can help!

-landonf


PGP.sig (193 bytes) Download Attachment

Re: Porting: Mac OS X Leopard (and Tiger)

by Landon Fuller-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Howdy,

I just thought I'd send a small status update:
        - I've got hotspot running on Mac OS 10.4 (Tiger) and 10.5 (Leopard).
        - Both i386 (10.4 & 10.5) and amd64 (10.5 Core 2 Duo Macs) are  
supported.
        - Swing works (x11)
        - Hotspot c1/c2 mostly work
        - -Xint interprer mode appears to run without errors.

There are, of course, still some significant bugs, and I'm continuing  
to work on hotspot Darwin i386 ABI stack alignment issues.

I've also submitted my Sun Contributor Agreement, in the hope that  
these changes can eventually move forward to OpenJDK.

I've posted the latest status update here:
        http://landonf.bikemonkey.org/code/macosx/ 
FreeBSD_Java_16_Status_Update.20071112.html

Cheers,
Landon Fuller


PGP.sig (193 bytes) Download Attachment