Guideline to port Sparc Solaris applicatin to Intel Solaris

Posted on 2005-05-09
Last Modified: 2013-12-05
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.
Question by:shuklasunil
    LVL 6

    Expert Comment

    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)
    LVL 34

    Expert Comment

    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).
    LVL 23

    Accepted Solution


    Author Comment


    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.

    LVL 34

    Expert Comment

    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.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
    Sometimes a user will call me frantically, explaining that something has gone wrong and they have tried everything (read - they have messed it up more and now need someone to clean up) and it still does no good, can I help them?!  Usually the standa…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now