cross-compiling desirable

I would [i]really[/i] like to see the ability in the Studio compilers to cross compile SPARC code on x86 and vice versa.

This would incentivize the OpenSolaris engineering team to support cross-compilation as well, I believe.

The reason for this is that my build host for SPARC is a _lot_ slower than the Opteron system I have. I suspect that I'm not alone in this, and that some folks may have the reverse.

Support for cross-compilation would probably also help ISVs out that want to support both ISAs. Imagine having a single build host to build a product for a bunch of platforms. Folks already do this for gcc.

I realize that a link step or somesuch is going to require a copy of the OS libraries and headers be installed, but its easy to get those from OpenSolaris (or even a stock Solaris build just installed or copied to an alternate directory).

The only thing we can't solve in OpenSolaris itself to do this is making the compilers (code generation, assembler, and optimization) able to cross-compile. If Studio had this feature (and it shouldn't be hard to add), then we'd be able to take the next step to enable cross-compilation of Solaris itself.

[1202 byte] By [gdamore] at [2007-11-26 9:23:12]
# 1

I agree that it would be very desirable.

I don't necessarily agree that it wouldn't be too hard; it depends on how the compiler was designed.

That said, one could also envisage a cross-compiler to earlier versions of Solaris, which would be neat (and should in fact be easier to do than true cross compilation). Currently, production builds have to be done on a machine running the earliest version of Solaris that you want to support. Version-cross-compilation would allow you to do the build on a later version of Solaris, but generate a binary that would work from the earlier version.

Just a thought.

/lib

slashlib at 2007-7-6 23:57:24 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2

Building on a later Solaris version for use on an earlier version is discussed in this paper by

Greg Nakhimovsky,

http://developers.sun.com/solaris/articles/developing_new_solaris.html

Cross-compiling (sparc->x86, x86->sparc) is frequently requested. It's something we are looking at, but we don't have a target date.

clamage45 at 2007-7-6 23:57:24 > top of Java-index,Development Tools,Solaris and Linux Development Tools...