Intel/Solaris vs Sparc/Solaris

Will the executables produced on Intel/Solaris using Sun Studio 11 work in exactly the same manner on Sparc/Solaris environment ?

What sort of issues would we encounter if our development environment is Intel/Solaris based whereas the live environment is Sparc/Solaris based ?

Appreciate a quick reply, as a critical decision needs to be made.

Thanks.

[376 byte] By [sri_nikhil] at [2007-11-26 9:43:04]
# 1

Ther's no simple answer here.

If you use only [i]standard-conforming[/i] language features (assuming you won't hit compiler/OS bugs) and don't make your code dependent on the architecture, it will work in exactly the same manner.

The above makes sense only if you writing the app from the scratch and/or know your code from A to Z. But if your app is large and old enough so that you don't know [i]exactly[/i] how it was written, you can't be sure that it will work the same way in another environment (by environment I mean hardware, OS, compiler and libs, not only hardware).

Just in case: there's no [b]binary[/b] compatibility between sparc and intel architectures. I am assuming you're going to recompile your app on Sparc.

MaximKartashev at 2007-7-7 0:43:17 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2

One more thing, executables will not run on both. An executable or

shared library will only run on the same kind of chip where it was

built. But it's very common for applications to build easily on

both platforms, and run fine on both (with different binaries for

each platform).

I just wanted to make sure you weren't expecting cross-chip

emulation or fat binaries or some other advanced feature.

--chris

ChrisQuenelle at 2007-7-7 0:43:17 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 3

Like the others said, you can't use the same binary image on different platforms. It IS possible to configure gcc as a cross-compiler, where it runs on one platform but generates an executable intended for another platform. I've set this up for an embedded target system using crosstool (http://kegel.com/crosstool/) but it's far from trivial, nor will it resolve issues like dynamic linking etc. If you really want cross-platform compatibility, try developing in java or perl, etc. They are converted to machine language at runtime, so there is a performance penalty, but you can't have everything.

amduser at 2007-7-7 0:43:17 > top of Java-index,Development Tools,Solaris and Linux Development Tools...