bug-gnulib
[Top][All Lists]
Advanced

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

Re: test-rwlock1 failing on latest Fedora Rawhide


From: Bruno Haible
Subject: Re: test-rwlock1 failing on latest Fedora Rawhide
Date: Thu, 24 Jan 2019 04:31:08 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-141-generic; KDE/5.18.0; x86_64; ; )

Let me summarize the issue.

(1) The distro sets LDFLAGS="-Wl,--as-needed". So, libraries that not are not
    required through at least 1 symbol are not linked in.
(2) threadlib.m4 defines LIBMULTITHREAD in a way that is meant to defeat
    -Wl,--as-needed. But it does not work, due to the reordering of
    options done by libtool.
    So, --as-needed is still in effect.
(3) threadlib.m4 enables weak symbols, and thread.h and lock.h define
    specific symbols as weak. Weak symbols are ignored in (1).

So, the fix is to define fewer symbols as weak.

pthread_create was defined as weak, so that users of gnulib could use
glthread_create without linking with -lpthread; it would then return
ENOSYS. Now, the use of glthread_create will require linking with -lpthread,
on platforms like glibc. It may be argued that this is actually a good thing.

Bruno




reply via email to

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