This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] BZ #5784: Build libpthread.a with ld -r
- From: Mike Frysinger <vapier at gentoo dot org>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 5 Sep 2012 19:06:14 -0400
- Subject: Re: [PATCH] BZ #5784: Build libpthread.a with ld -r
- References: <20120905181207.GA16550@intel.com>
On Wed, Sep 5, 2012 at 2:12 PM, H.J. Lu wrote:
> This patch builds libpthread.a with ld -r. Tested on x86-64 and ia32.
> OK to install?
seems like this fixes one use case while breaking others. for example
(the exact contents of test.c doesn't matter):
$ gcc test.c -static -lpthread; size a.out
text data bss dec hex filename
658226 3488 12568 674282 a49ea a.out
$ gcc test.c -static -Wl,--whole-archive -lpthread
-Wl,--no-whole-archive; size a.out
/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/libpthread.a(sem_open.o):
In function `sem_open':
/build/buildd/eglibc-2.11.1/nptl/sem_open.c:333: warning: the use of
`mktemp' is dangerous, better use `mkstemp' or `mkdtemp'
text data bss dec hex filename
756278 3560 30200 790038 c0e16 a.out
-mike