[PATCH] BZ #5784: Build libpthread.a with ld -r
Mike Frysinger
vapier@gentoo.org
Wed Sep 5 23:06:00 GMT 2012
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
More information about the Libc-alpha
mailing list