On 11/15/19 3:00 AM, Szabolcs Nagy wrote:
> The gthr weak reference based single thread detection is unsafe with
> static linking and in case of dynamic linking it's ineffective on musl
> since pthread symbols are defined in libc.so.
> 
> Ideally this should be fixed for all targets, since glibc plans to move
> libpthread.so into libc.so too and users want to static link to pthread
> without --whole-archive: PR87189.
> 
> For now we have to explicitly opt out from the broken behaviour in the
> config machinery of each target lib and libgcc was previously missed.
> 
> libgcc/ChangeLog:
> 
> 2019-11-15  Szabolcs Nagy  <szabolcs.n...@arm.com>
> 
>       * config.host: Add t-gthr-noweak on *-*-musl*.
>       * config/t-gthr-noweak: New file.
> 
Given the patch is constrained to musl, it's obviously OK.

WRT the bigger question, even if glibc gets those bits moved into
libc.so it's likely going to be a long time before the split between
libc and libpthreads disappears from the wild :(

jeff

Reply via email to