[PATCH] Avoid unnecessary __cxa_quard_{acquire,release} (PR middle-end/54630)
Jakub Jelinek
jakub@redhat.com
Mon Nov 19 08:14:00 GMT 2012
Hi!
On Sat, Nov 17, 2012 at 12:27:51PM -0500, Jason Merrill wrote:
> I suppose these changes are fine, but it might be more future-proof
> to compile with -fno-threadsafe-statics...or fix the build system so
Yeah, -fno-threadsafe-statitics might be a good idea, at least until/if ever
somebody starts playing with making gcc thread-safe again.
> that the C++ library is available when linking the compiler.
>From what I understood, it was just weird configure options (and likely a
user bug in that) that resulted in C++ library not being available in the
PR. The reason for my patch was solely that it is more costly to have local
statics. With -fno-threadsafe-statics it will be less costly than before,
still it is about an extra guard var and need to load it/test it before
every first use in the function, right?
Jakub
More information about the Gcc-patches
mailing list