Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Mon, 10 Feb 2014 12:35:14 +0000
From: Oliver Schneider <>
Subject: How to build libc.a with -fPIC for all archive members?


how can I build the static library from the musl source, but compiling
with -fPIC?

I tried the obvious:

CFLAGS=-fPIC ./configure --enable-gcc-wrapper --disable-shared

and then built. But I am getting the following linker error still
(albeit for a different member function and object file than before):

/usr/local/musl/lib/libc.a(memmove.o): relocation R_X86_64_PC32 against
symbol `memcpy' can not be used when making a shared object; recompile
with -fPIC
final link failed: Bad value

The reason I want to do this, is to have a statically linked .so. I.e.
an .so that has no external dependency other than the system calls. Or
is this known to conflict with the ever-present glibc in some way?

Thanks for any insight into how to resolve this,

// Oliver

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.