From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/435 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Compilation error Date: Wed, 17 Aug 2011 09:39:13 -0400 Message-ID: <20110817133913.GX132@brightrain.aerifal.cx> References: <6b8e6a08f65ec476283a3699a41451d7@smtp1.ispfr.net> <20110807193658.GA29562@port70.net> <20110807193431.GI132@brightrain.aerifal.cx> <20110807195006.GJ132@brightrain.aerifal.cx> <20110807220940.GC29562@port70.net> <20110807220025.GL132@brightrain.aerifal.cx> <20110808070817.GD29562@port70.net> <20110817103328.GR29562@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1313588430 1160 80.91.229.12 (17 Aug 2011 13:40:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 17 Aug 2011 13:40:30 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-436-gllmg-musl=m.gmane.org@lists.openwall.com Wed Aug 17 15:40:25 2011 Return-path: Envelope-to: gllmg-musl@lo.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by lo.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1QtgLz-0004c2-Vl for gllmg-musl@lo.gmane.org; Wed, 17 Aug 2011 15:40:20 +0200 Original-Received: (qmail 19676 invoked by uid 550); 17 Aug 2011 13:40:19 -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 19665 invoked from network); 17 Aug 2011 13:40:18 -0000 Content-Disposition: inline In-Reply-To: <20110817103328.GR29562@port70.net> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:435 Archived-At: On Wed, Aug 17, 2011 at 12:33:28PM +0200, Szabolcs Nagy wrote: > > the only change to the linker flags is -L/path/to/pcclibs -lpcc > > instead of -lgcc, so either pcc does not call ld properly > > or there is some issue with -lpcc > > > > i've just rechecked this and the problem simply was that > libpcc.a was not compiled with -fPIC It's disturbing that this made a difference. There should be no global data needed by libpcc, and if there is some needed, I question what it's doing and whether it's really safe... > (it used to work because i didn't specify -lpcc when building libc.so > and later i only tried dynamic linking with pcc > which adds -lpcc automatically so there were no missing symbols) This still need not work; it will result in PLT relocations in libc.so which could crash if libpcc is needed prior to relocation. And it will badly hurt runtime performance. > but i guess it would be nice if musl implemented long long arithmetics > and made -lpcc/-lgcc unnecessary Yes.. > (i'm not sure where alloca should go, pcc does not provide it) WTF? alloca cannot be implemented as a function. Does gcc provide an alloca function? Rich