• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 430
  • Last Modified:

Guideline to port Sparc Solaris applicatin to Intel Solaris

We have an application developed for Sparc Solaris 8. We are thinking of expanding its domain on Intel processor too. I am looking for the guidelines for porting my application from Sparc Solaris to Intel Solaris and are there known issues to be taken into consideration? What I am really worried about is something like endianness (or data alignment and other such issue which I might not even be aware of), which is different on Sparc Solaris then on Intel Solaris. What effect does endianness has on something like socket programming. Since endianness of bytes received from network on Sparc Solaris doesn’t has to be changed to use, but endianness of the bytes received from network on Intel Solaris has to be changed. Really appreciate a quick response on this.
1 Solution
well, normally you need to pass from network order to the computer order (always, only sparcs and ppc have the network endiness, x86 have little_endian). This should be done. some operations should also be checked like << and & (cause endiness) but normally the compiler do the job, and types, most intels are 32 and some sparcs are 64 bits, so maybe int wont be 32 but 64 bits... i have programmed a game: xblast it works on solaris sparc, linux  x86 and on windows x86. we just checked on sun for that: (every else is like linux x86)
#ifdef sparc       
 typedef uint32_t u_int32_t;
for network sockets on x11... every thing else is done by gcc (maybe it is also   a solaris not a sparc thing, so maybe you dont need to bother)
Well, something operating in your favor is that Solaris is a fairly hardware-independent OS. Only about 5% of its code is affected by the hardware archicture. So unless your application gets down-n-dirty with Solaris, or tries to deal directly with the hardware, its unlikely you'd have to do anything except re-compile it on the Intel platform (or cross-compile on SPARC).
shuklasunilAuthor Commented:

How do you say that only 5% of code is hardware dependent. Can you forward some link confirming this. Also how will I know if my application is making low level calls. Do you have list of such calls that I can look for in the code.

Offhand, I don't know of any link confirming that. I recall discovering that fact when my organization was weighing *NIX vs. NT a few years ago. Fortunately, we went *NIX.

Want to know if your app is making low-level calls low enuf to be an issue? If you're not the programmer, then ask the programmer(s). Unless your app is a device driver, its probably not going to be an issue.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now