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: PATCH RFA: PR go/55201: Create libatomic convenience library


On Tue, Dec 18, 2012 at 2:30 PM, Richard Henderson <rth@redhat.com> wrote:
> On 12/18/2012 02:09 PM, Ian Lance Taylor wrote:
>> I have now committed this follow-on patch, to make libgo use the new
>> libatomic_convenience library.  This means that the changes to
>> explicitly link against -latomic are no longer necessary.
>
> Hang on, what are we doing here.  Are we linking libatomic statically
> into libgo?  That's only going to work so long as the target does not
> require the use of a mutex.  While that's most desktop targets, it's
> certainly not all of them.
>
> If the target requires a mutex for the atomic operation, then there
> must be exactly one copy of the atomic library.

Argh.  But why?  Wouldn't that only apply to cases where the lock was
sometimes locked by one library and sometimes locked by a different
one?

Ian


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