On Wed, 2005-01-26 at 08:21 -0600, Bob Friesenhahn wrote: > On Wed, 26 Jan 2005, Gary V. Vaughan wrote: > > > Kevin F. Quinn wrote: > > >> Apologies if this is a stupid question, but please could someone > >> explain to me why libtool sets '-DPIC' for shared libraries, while > >> gcc reliably defines '__PIC__' when it generates PIC code? > >> Setting '-DPIC' encourages people to do '#ifdef PIC' when surely > >> '#ifdef __PIC__' would be more reliable. > > > > Libtool supports plenty more compilers than just gcc. > > I recall from discussions a couple of years ago that this define is > even used from within some Fortran code. IIRC, -DPIC predates -D__PIC__.
So I'd guess older code had used "#ifdef PIC", while __PIC__ has been to add to gcc. I don't know how other compilers handle this issue. Ralf _______________________________________________ http://lists.gnu.org/mailman/listinfo/libtool