On Wed, 20 Nov 2013, Rong Xu wrote: > I could do this in the SPEC > -Wl,-Bstatic -latomic -Wl,-Bdynamic > which would link libatomic statically. > I works for me. But it looks a little weird in gcc driver.
I think we should generally link libatomic with --as-needed by default on platforms supporting --as-needed, in line with the general principle that C code just using language not library facilities (_Atomic in this case) shouldn't need any special options to link it (libatomic is like libgcc, which is linked in automatically); the trickier question is what to do with it on any systems supporting shared libraries but not --as-needed. -- Joseph S. Myers jos...@codesourcery.com