From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4562 Path: news.gmane.org!not-for-mail From: Oliver Schneider Newsgroups: gmane.linux.lib.musl.general Subject: How to build libc.a with -fPIC for all archive members? Date: Mon, 10 Feb 2014 12:35:14 +0000 Organization: CYREN Iceland Message-ID: <52F8C782.4060308@f-prot.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1392035721 18825 80.91.229.3 (10 Feb 2014 12:35:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 10 Feb 2014 12:35:21 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4566-gllmg-musl=m.gmane.org@lists.openwall.com Mon Feb 10 13:35:30 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1WCq5C-0000WU-Ap for gllmg-musl@plane.gmane.org; Mon, 10 Feb 2014 13:35:30 +0100 Original-Received: (qmail 7284 invoked by uid 550); 10 Feb 2014 12:35:28 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 7275 invoked from network); 10 Feb 2014 12:35:28 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 X-Antivirus: Scanned by F-PROT Antivirus (http://www.f-prot.com) Xref: news.gmane.org gmane.linux.lib.musl.general:4562 Archived-At: Hi, 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