x86 Solaris vs Sparc Solaris 
Author Message
 x86 Solaris vs Sparc Solaris

Maybe it's another FAQ, but please give some hints.

Does x86 Solaris have the same API as Solaris running on Sparc stations?
More specifically I am using ANSI C, SVR4 API (semaphore, mmap), Pthread
to develop tools on Sparc, can I just use the same source code and
recompile on x86 Solaris to have excutables that will work.

How is x86 Solaris accepted by major software vendors, I am interested
in EDA vendors like Cadence Synopsys. I don't think they do, there must
be some reasons.

In brief, what's the difference between these two Solaris. Please also
reply by email.
Thanks!



Fri, 08 Dec 2000 03:00:00 GMT  
 x86 Solaris vs Sparc Solaris


Quote:
>Maybe it's another FAQ, but please give some hints.

>Does x86 Solaris have the same API as Solaris running on Sparc stations?
>More specifically I am using ANSI C, SVR4 API (semaphore, mmap), Pthread
>to develop tools on Sparc, can I just use the same source code and
>recompile on x86 Solaris to have excutables that will work.

Yes and no...

One big question is : do you have to talk between pc and sparc boxes or not
(this includes network links, backed-up files on diskettes or tapes, ...).

If no, then you should not see many differences (hint : use grep and such to
count x86 in man pages. You'll be surprised how few and specific they are).

If yes, then you're going into some trouble because PC and Sparc are endian
opposite (this affects all types, including double and float). Moreover, as
far as I know, Sparc aligns double fields on an 8 byte boundary while Intel
aligns on 4 bytes (if using Sun compiler at least). This could cause you
some trouble if you try to read on a PC a binary file written by Sparc (or
the other way).

You could also see some diffs if you're doing intensive floating maths
because Sparc and Intel don't use the same precision when computing
intermediate values.

Note : I'm not 100% sure about the 4/8 bytes boundary but I'll check very
soon - feel free to ask in a week or so.

Quote:
>How is x86 Solaris accepted by major software vendors, I am interested
>in EDA vendors like Cadence Synopsys. I don't think they do, there must
>be some reasons.

No idea...

Quote:
>In brief, what's the difference between these two Solaris. Please also
>reply by email.

If you're dealing only with portable code (using XDR or something like,
using nltoh() and such), you'll see no difference. Don't forget about screen
size : 1152x900 is not common on PC video cards.

If you're dealing with system tasks that depend on the hw configuration, it
will be a little different (device names may not be the same for example -
but SunInstall is 99% the same).

And don't forget that Sun support for PC boxes is - to my opinion - not very
good : I'm searching for high quality PC that will run Solaris 2.5.1 and it
is a challenging task because brand names renew their product line quite
often while Sun doesn't do much efforts in maintaining older OS versions on
newer PC hw.

Quote:
>Thanks!

Hopes this help...

Erik PROST - S.A.R.L ORPHEUS



Fri, 08 Dec 2000 03:00:00 GMT  
 x86 Solaris vs Sparc Solaris

[[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]

Quote:

>Does x86 Solaris have the same API as Solaris running on Sparc stations?
>More specifically I am using ANSI C, SVR4 API (semaphore, mmap), Pthread
>to develop tools on Sparc, can I just use the same source code and
>recompile on x86 Solaris to have excutables that will work.

Yes, the APIs are identical except a few hardware specific ones which
you normally don't use.

The same source code should work on both, but there are some caveats:

        - SPARC has strict alignment requirements; x86 does not.
          (i.e., you can't just cast any random char * into a int * and
          expect it to work; pointers returned from malloc are OK)
        - SPARC is big endian, x86 little endian; network software needs
          to convert stuff to network byte order (big endian); if you
          forget that on SPARC, it still works, if you forget it on x86,
          it doesn't work.
        - SPARC structure passing convention make code like this:

            a.c:
                void foo(struct bar *x)
            b.c:
                struct bar x;

                foo(x);
          actually sort-of work. (except that foo can't change teh struct
          passed)

This means that you would need to test on both systems.

Quote:
>How is x86 Solaris accepted by major software vendors, I am interested
>in EDA vendors like Cadence Synopsys. I don't think they do, there must
>be some reasons.

Market size would probably be the most compelling reason not to support x86.
While "it's just a recompile", you do need to test, package and support.

Casper
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.



Sat, 09 Dec 2000 03:00:00 GMT  
 x86 Solaris vs Sparc Solaris

    Jian> Maybe it's another FAQ, but please give some hints.  Does
    Jian> x86 Solaris have the same API as Solaris running on Sparc
    Jian> stations?  More specifically I am using ANSI C, SVR4 API
    Jian> (semaphore, mmap), Pthread to develop tools on Sparc, can I
    Jian> just use the same source code and recompile on x86 Solaris
    Jian> to have excutables that will work.

Essentially, yes.

There are some incompatibilities such as byte ordering (which can be
taken care of with XDR) and data alignment in binary files (use ASCII
or design your binary files properly for interoperability between
platforms).

I have ``ported'' some non-trivial EDA applications form Solaris Sparc
to Intel without changing a single line of source code.  I only had
to change Makefiles; if I had been more prepared I wouldn't of had to
even change Makefiles and could have just typed `make' once on
each platform.

    Jian> How is x86 Solaris accepted by major software vendors, I am
    Jian> interested in EDA vendors like Cadence Synopsys. I don't
    Jian> think they do, there must be some reasons.

Solaris x86 is very poorly supported by EDA vendors. I think the main
reasons include a belief that their customers all want to convert to
NT.  Although a Solaris x86 port can be as easy as a re-compile and
therefore often simpler than say a Linux port and much simpler than an
NT port, there are costs associated with supporting another platform
(distribution, testing, FLEXlm licensing,...).  Solaris x86 has a
small share of the UNIX market (which isn't helped by Sunsoft in my
experience!) and so they seem unwilling to support it.  Perhaps all
the Solaris on Merced hype will change the situation in the future?

Nigel



Sun, 10 Dec 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. ModelSim performance on Solaris/sparc and Linux/x86

2. Inconsistent behaviour between SunOS 4.1.3U1 and Solaris 2.5.1 (x86 and Sparc)

3. Q: porting x86 asm to Solaris v2.6 (SunOS 5.5.1) running on x86

4. fortran code migration problem from Sparc Solaris 2.5.1 to Intel Solaris x86 2.5.1.

5. APL for Sparc 20 / Sun Solaris ?

6. Can't compile gforth-0.3.0 on Sparc Solaris 2.4

7. FREEWARE: H2D 1.18 for SPARC (Solaris)

8. FREEWARE: H2D 1.18 for SPARC (Solaris)

9. 64-bit poplog on solaris+sparc

10. Seeking precompiled Eiffel Demos for Sun Solaris Sparc

11. Rexx for SPARC Solaris

12. Announcement: Compiler for SPARC/Solaris platform with full sources

 

 
Powered by phpBB® Forum Software