http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49811
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- -shared is forcing a creation of a shared library while -static is forcing the libraries to be staticaly linked. So this only makes sense if you have forcing static libc (etc.) for a shared library. If you force a static library use -Wl,-Bstatic -lxyz -Wl,-Bdynamic .