Kelly O'Hair's Weblog (blogs.sun.com)

pageicon Wednesday May 07, 2008

Sun Studio Compilers on LINUX?

With the magic of Mercurial, you can see changesets, like this one: http://hg.openjdk.java.net/jdk7/jdk7/hotspot/rev/485d403e94e1. Which Serguei Spitsyn integrated recently.

But wait, what does this changeset actually mean? Sun Studio on Linux? Does that make sense? YES! It does and it's true. Mind you, it's just Hotspot that can be built with the Sun Studio compilers on Linux right now, but it's an important piece, the Hotspot C++ code is not a trivial pile of code to compile and optimize correctly. My hat is off to the Sun Studio team in making this all happen. What should be interesting now is how well the rest of the tools work like dbx and the analyzer/collector.

More can be read about the Sun Studio Linux Compilers at the Sun Studio Site.

Humm, I guess I'm now on the hook to see if the rest of the OpenJDK can be setup to build with Sun Studio on Linux.... Back to work...

-kto

P.S. No, we are not abandoning gcc/g++, just providing choices on how the OpenJDK can be built.

Comments:

Very Cool.
Congratulations to the team.

Is this a new beginning?

--Vijay

Posted by Vijay Tatkar on May 07, 2008 at 03:31 PM PDT #

'No, we are not abandoning gcc/g++, just providing choices on how the OpenJDK can be built.'

Given Sun Studio is proprietary, abandoning gcc/g++ would pretty much make OpenJDK a pointless effort. Not sure of the benefits of this Sun Studio work, but good job to those who've put in the hard work and I hope it's useful for someone.

Posted by Andrew John Hughes on May 08, 2008 at 02:24 AM PDT #

As I said, we would never abandon gcc/g++, makes no sense. But if we can get a significant performance boost by building the official Sun JDK with the free Sun Studio compilers on Linux, it could benefit everyone using that JDK. Time will tell, we don't have the complete data yet, but we would like to have the choice available to us.

But most importantly, this option provides an alternative developer tool.

The dbx in Sun Studio can debug the gcc/g++ built product or you could try building with the Sun Studio compilers. Regardless of the compiler used, the Sun Studio IDE (NetBeans based), should work, but I suspect some IDE/dbx features may require using the Sun Studio compilers.

Options are good. :^)

-kto

Posted by Kelly O'Hair on May 08, 2008 at 10:24 AM PDT #

Hard to see what proprietary has to do with this, except for the crowd that likes nothing but opensource.
Sun Studio is free to download (try http://developers.sun.com/sunstudio ) and use on Solaris as well as on Linux. It has been in development for 20+ years in some form, so its mature, high performing, well-featured and well accepted in the marketplace.
And it may well be opensource someday (soon).
Sun Studio is based on the (Open Source) NetBeans IDE with C/C++ extensions/support and has a world class debugger (dbx) and performance analyzer in addition to highly performing libraries and compilers (and make, etc, etc). All integrated into one package.
It has won praise from several open source developers and is in use in several open source projects (tho as you implied above, it cant be the only compiler used).

Not meaning to sound defensive, but this sounded like an opportunity to get the facts out there!

Thanx for listening

--Vijay

Posted by Vijay Tatkar on May 08, 2008 at 06:17 PM PDT #

(rambling slightly off topic here)

I'm a Solaris admin for a living. One of the greatest pains in the backside for a Solaris admin these days is whether a given piece of software was compiled with the Sun compiler or gcc. If they could be made to interoperate better at the library and module level, it would make me *so* much happier.

But anyway, well done :-) Cross-platforming is always good for software robustness - revealing assumptions and re-examining code.

Posted by David Gerard on May 09, 2008 at 10:36 AM PDT #

Send me an email on what kind of problems you are seeing. I know C++ is troublesome but I hadn't heard of any issues with simple C programs. But I agree with you, if we can make the built libraries work seemlessly regardless of who built them, that would be more goodness.

-kto

Posted by Kelly O'Hair on May 09, 2008 at 11:34 AM PDT #

The Sun Studio C++ team is working on getting G++ABI into the product (well, there isnt just one G++ABI, there are several, but we wont get into that here, right :-)

In Sun Studio 12 (and patches/Expresses available since then), the team has made considerable progress in compiling a large collection of Open Source programs. The team regularly uses about 400 or so of these for biweekly testing of builds.

As Kelly mentioned, for C programs, there is typically only the SVR4 ABI to worry about, so interop isnt a big issue, but for C++ this is generally true.

I'd like to hear about what kind of interop issues you are seeing. Send Kelly or me email and I'll be happy to look at the list and respond to you individually (I manage the C/C++ teams here at Sun)

And, thanks for listening and your feedback

Posted by Vijay Tatkar on May 09, 2008 at 02:50 PM PDT #

Post a Comment:
Comments are closed for this entry.