Path: utzoo!attcan!uunet!snorkelwacker!bloom-beacon!LARRY.MCRCIM.MCGILL.EDU!mouse From: mouse@LARRY.MCRCIM.MCGILL.EDU Newsgroups: comp.windows.x Subject: Re: Gcc and Cc Message-ID: <9009131007.AA11184@Larry.McRCIM.McGill.EDU> Date: 13 Sep 90 10:07:25 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 31 > 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