lindholm@greve.ucs.ubc.ca (George Lindholm) (09/13/90)
How do I build the binaries using both Gcc and Cc for my sparc station? The problem I am seeing is the way that appears to be the difference in the way that a structure is passed by Gcc and Cc. Is it possible to build SunOS shared libraries with Gcc? Thanks lindholm@staff.ucs.ubc.ca George_Lindholm@mtsg.ubc.ca USERGNL@UBCMTSG.BITNET University of British Columbia Computing Services (604) 228-4375
mouse@LARRY.MCRCIM.MCGILL.EDU (09/13/90)
> How do I build the binaries using both Gcc and Cc for my sparc > station? First, there's really not much reason to bother with gcc on SPARC-based Suns. At the moment Sun's compiler is, I believe, slightly better. > The problem I am seeing is the way that appears to be the difference > in the way that a structure is passed by Gcc and Cc. I seem to recall seeing somewhere that gcc on the SPARC uses an incompatible passing mechanism for structures, and there is no way to change this. I do not know how much truth there is in this; the memory is hazy and I can't locate the place I found it with a quick search. > Is it possible to build SunOS shared libraries with Gcc? Gcc can't generate position-independent code, I think, and while you can make non-PIC code into a shared library, it can't be used without losing the code-sharing advantage because each process will potentially map it at a different address and must do all the relocation patchups, which will cause private copies of most of (probably all of) the text. The dynamic-binding advantage will still remain, and you may choose to do it anyway just for the sake of dynamic binding, for after all, you definitely don't get the code-sharing advantage when you link static. (Well, you do, but only among processes executing the same final binary, not among all processes using the library.) der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu
mark@DRD.Com (Mark Lawrence) (09/14/90)
Somebody writes: } > How do I build the binaries using both Gcc and Cc for my sparc } > station? mouse@LARRY.MCRCIM.MCGILL.EDU wrote: } First, there's really not much reason to bother with gcc on SPARC-based } Suns. At the moment Sun's compiler is, I believe, slightly better. unless, of course, you are using it because it handles ANSI constructs and Sun's cc doesn't (and won't for a while, even when you have to pay for it) or you are developing in a heterogenous environment and want to use the same compiler everywhere. -- mark@DRD.Com uunet!apctrc!drd!mark$B!J%^!<%/!!!&%m!<%l%s%9!K(B