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:18:40 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-141-generic; KDE/5.18.0; x86_64; ; )

Dmitry V. Levin wrote:
> According to the log, it was libtool that broke a valid command
> 
> /bin/sh ../../libtool --tag=CC --preserve-dup-deps --mode=link gcc -O2 -g 
> -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 
> -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong 
> -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 
> -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic 
> -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection 
> -Wl,-z,relro -Wl,--as-needed -Wl,-z,now 
> -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o test-rwlock1 test-rwlock1.o 
> libtests.a ../../gnulib/lib/libgnu.la libtests.a -pthread -Wl,--push-state 
> -Wl,--no-as-needed -lpthread -Wl,--pop-state -lrt 
> 
> into an invalid command
> 
> libtool: link: gcc -O2 -g -pipe -Wall -Werror=format-security 
> -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions 
> -fstack-protector-strong -grecord-gcc-switches 
> -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 
> -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic 
> -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -Wl,-z 
> -Wl,relro -Wl,--as-needed -Wl,-z -Wl,now 
> -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o test-rwlock1 test-rwlock1.o 
> -pthread -Wl,--push-state -Wl,--no-as-needed -Wl,--pop-state libtests.a 
> ../../gnulib/lib/.libs/libgnu.a libtests.a -lpthread -lrt -pthread 
> 
> What's the version of libtool that's produced such a mess?

Even the latest released libtool versions do this.

This patch should fix the issue. Pushed.


2019-01-23  Bruno Haible  <address@hidden>

        thread: Force linking with -lpthread, even when --as-needed is in use.
        Reported by Richard W.M. Jones <address@hidden> in
        <https://lists.gnu.org/archive/html/bug-gnulib/2019-01/msg00123.html>.
        * lib/glthread/thread.h (pthread_create): Don't declare weak.

diff --git a/lib/glthread/thread.h b/lib/glthread/thread.h
index ca40508..1d2a544 100644
--- a/lib/glthread/thread.h
+++ b/lib/glthread/thread.h
@@ -133,8 +133,6 @@ extern int glthread_in_use (void);
    call to foo(...) in the same function.  To avoid this, we test the
    address of a function in libpthread that we don't use.  */
 
-#  pragma weak pthread_create
-
 #  ifndef pthread_sigmask /* Do not declare rpl_pthread_sigmask weak.  */
 #   pragma weak pthread_sigmask
 #  endif




reply via email to

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