This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: atomic update of profile counters (issue7000044)


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
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]