http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53299
--- Comment #3 from Daniel Richard G. <skunk at iskunk dot org> 2012-05-10 20:11:15 UTC --- (In reply to comment #2) > What is the correct option to pass to the vendor compiler in order to get code > suitable for inclusion in a shared library? In this case, it's -KPIC. I don't see that this macro should be necessary, however, given that Libtool already knows the magic PIC incantation for many systems. Another excerpt from the bootstrap log (this one with --disable-lto and no -errwarn): [...] Configuring stage 1 in ./gcc configure: creating cache ./config.cache checking build system type... sparc64-sun-solaris2.8 checking host system type... sparc64-sun-solaris2.8 [...] checking for objdir... .libs checking for cc -xarch=v9 -xildoff option to produce PIC... -KPIC -DPIC checking if cc -xarch=v9 -xildoff PIC flag -KPIC -DPIC works... yes checking if cc -xarch=v9 -xildoff static flag -Bstatic works... no checking if cc -xarch=v9 -xildoff supports -c -o file.o... yes checking if cc -xarch=v9 -xildoff supports -c -o file.o... (cached) yes checking whether the cc -xarch=v9 -xildoff linker (ld -64) supports shared libraries... yes checking dynamic linker characteristics... solaris2.8 ld.so [...]