From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9835 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: musl libc.so working and almost building with current pcc Date: Sun, 3 Apr 2016 20:04:48 -0400 Message-ID: <20160404000448.GG21636@brightrain.aerifal.cx> References: <20160403214755.GB13799@newbook> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1459728307 21957 80.91.229.3 (4 Apr 2016 00:05:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 4 Apr 2016 00:05:07 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-9848-gllmg-musl=m.gmane.org@lists.openwall.com Mon Apr 04 02:05:07 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1ams0v-0005Fr-BA for gllmg-musl@m.gmane.org; Mon, 04 Apr 2016 02:05:05 +0200 Original-Received: (qmail 22413 invoked by uid 550); 4 Apr 2016 00:05:02 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 22392 invoked from network); 4 Apr 2016 00:05:02 -0000 Content-Disposition: inline In-Reply-To: <20160403214755.GB13799@newbook> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:9835 Archived-At: On Sun, Apr 03, 2016 at 02:47:56PM -0700, Isaac Dunham wrote: > Hello, > Current (20160403) pcc almost builds a working libc.so. > > (Unfortunately, it's still necessary to fix the pcc-libs package > by updating config.guess/config.sub and adding protected visibility; > I didn't add protected visibility and forced -fPIC, though the build > system seems to add -fPIC for some files.) Everything in libpcc.a needs to be _hidden_, not protected. The issue is not whether it binds locally but whether it produces wrongly-exported symbols in shared libs it gets linked into. > However, PCC reports a major internal compiler error at line 1382 > of ldso/dynlink.c (which is conditional on FDPIC support). > If I convert the "if (DL_FDPIC) ..." to an ifdef, I get a working libc. > (src/complex/catanf.c is now properly compiled.) It's always defined (to either 0 or 1) so #ifdef produces wrong code. Did you try #if DL_FDPIC? That should work but there's obviously some serious pcc bug going on here, probably preprocessor breakage again. FWIW pcc used to work fine but they keep breaking it, usually the preprocessor. Rich