libtool: Compilers

1 
1 15.3.2 Compilers
1 ----------------
1 
1 The only compiler characteristics that affect libtool are the flags
1 needed (if any) to generate PIC objects.  In general, if a C compiler
1 supports certain PIC flags, then any derivative compilers support the
1 same flags.  Until there are some noteworthy exceptions to this rule,
1 this section will document only C compilers.
1 
1    The following C compilers have standard command line options,
1 regardless of the platform:
1 
1 'gcc'
1 
1      This is the GNU C compiler, which is also the system compiler for
1      many free operating systems (FreeBSD, GNU/Hurd, GNU/Linux, Lites,
1      NetBSD, and OpenBSD, to name a few).
1 
1      The '-fpic' or '-fPIC' flags can be used to generate
1      position-independent code.  '-fPIC' is guaranteed to generate
1      working code, but the code is slower on m68k, m88k, and SPARC
1      chips.  However, using '-fpic' on those chips imposes arbitrary
1      size limits on the shared libraries.
1 
1    The rest of this subsection lists compilers by the operating system
1 that they are bundled with:
1 
1 'aix3*'
1 'aix4*'
1      Most AIX compilers have no PIC flags, since AIX (with the exception
1      of AIX for IA-64) runs on PowerPC and RS/6000 chips.  (1)
1 
1 'hpux10*'
1      Use '+Z' to generate PIC.
1 
1 'osf3*'
1      Digital/UNIX 3.x does not have PIC flags, at least not on the
1      PowerPC platform.
1 
1 'solaris2*'
1      Use '-KPIC' to generate PIC.
1 
1 'sunos4*'
1      Use '-PIC' to generate PIC.
1 
1    ---------- Footnotes ----------
1 
1    (1) All code compiled for the PowerPC and RS/6000 chips
1 ('powerpc-*-*', 'powerpcle-*-*', and 'rs6000-*-*') is
1 position-independent, regardless of the operating system or compiler
1 suite.  So, "regular objects" can be used to build shared libraries on
1 these systems and no special PIC compiler flags are required.
1