bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gold/23424] gold doesn't build on Darwin


From: harryf at gmx dot com
Subject: [Bug gold/23424] gold doesn't build on Darwin
Date: Sun, 22 Jul 2018 10:16:13 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=23424

--- Comment #3 from Harald Fernengel <harryf at gmx dot com> ---
(In reply to Cary Coutant from comment #2)
> > It seems that using PTHREAD_ONCE_INIT can only be used in a static context, 
> > as
> > documented in the man page (https://linux.die.net/man/3/pthread_once). Since
> > it's POD, doing a deep copy with a statically initialized dummy should be a
> > pragmatic workaround (see attached patch).
> 
> Can you point out where in that man page you found this? I've read
> several man pages for pthread_once, and can't find any such
> restriction on the use of PTHREAD_ONCE_INIT.

Sorry for that, I've wrongly translated "not in automatic storage" to "only
static storage" in my mind. Of course, dynamic storage must also work.

In any case - Any preference on the fix? So far, we have my workaround to
statically initialize a dummy instance and then deep copying it per object
instance, or switching compilation to C++11.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]