Building and linking shared libaries for multiple differentversionsof UNIX

Michael Sweet mike at easysw.com
Wed May 16 17:21:15 GMT 2001


Steve Langasek wrote:
> ...
> -KPIC, -fPIC, -fno-common, +z... there's quite a variety of flags
> available, depending on the platform. :P  I imagine CUPS has a pretty
> extensive list.

Actually, it isn't too bad.  Basically we flag when PIC is needed and
at the end either use the GCC option (-fPIC) or the vendor option (case
statement).

> ...
> Although on Linux, it's recommended that you use gcc for linking
> instead of calling ld directly.

Yes, and on many platforms you use cc/gcc instead of ld to correctly
build a DSO.  CUPS handles this, too, with DSO and DSOFLAGS
definitions (separate from LD, which could be used for other things)

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products                  mike at easysw.com
Printing Software for UNIX                       http://www.easysw.com




More information about the samba-technical mailing list