Using --disable-shared to build non-apple gcc on darwin

Peter O'Gorman pogma@opendarwin.org
Tue Sep 7 13:01:00 GMT 2004


Hi,
First, I'd like to apologize if this is a silly question, sorry...

When gcc is built having been configured --disable-shared, it builds libgcc, 
libstdc++ etc without any pic flags, so on darwin, the fortran libraries, 
for example, contain common symbols (gcc-3.4.1) and cannot be used as input 
to ld when building a shared library (.dylib). Also, in the FSF gcc (not the 
apple branch), there's no comcept of private external symbols, so generating 
multiple shared libraries (obviously not fortran ones :-p) and then using 
these to create a program will likely give you errors about multiple 
definitions of symbols (these symbols having made their way into many shared 
libs by virtue of being global symbols in libgcc).

My questions is, is this by design? Should we not expect to be able to build 
working shared libraries with a compiler built --disable-shared?

Thanks,
Peter



More information about the Gcc mailing list