From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/5828 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: compiling musl on x86_64 linux with ppc Date: Wed, 13 Aug 2014 10:23:32 -0400 Message-ID: <20140813142332.GN12888@brightrain.aerifal.cx> References: <20140813091843.GD5170@example.net> <20140813123832.GK12888@brightrain.aerifal.cx> <20140813125607.GK5170@example.net> 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 1407939836 6147 80.91.229.3 (13 Aug 2014 14:23:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Aug 2014 14:23:56 +0000 (UTC) Cc: musl@lists.openwall.com To: u-igbb@aetey.se Original-X-From: musl-return-5834-gllmg-musl=m.gmane.org@lists.openwall.com Wed Aug 13 16:23:49 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 1XHZSu-0007HO-89 for gllmg-musl@plane.gmane.org; Wed, 13 Aug 2014 16:23:48 +0200 Original-Received: (qmail 30325 invoked by uid 550); 13 Aug 2014 14:23:46 -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 30317 invoked from network); 13 Aug 2014 14:23:46 -0000 Content-Disposition: inline In-Reply-To: <20140813125607.GK5170@example.net> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:5828 Archived-At: On Wed, Aug 13, 2014 at 02:56:08PM +0200, u-igbb@aetey.se wrote: > > > src/aio/aio_readwrite.c, line 23: compiler error: unsupported xasm constraint r11 > > > error: XXXXX/libexec/ccom terminated with status 1 > > > make: *** [src/aio/aio_readwrite.o] Error 1 > > > ----------- > > > > > > Is there any way around this, short of adding the register assignment > > > functionality to the compiler? > > > > Just use the #ifdef __clang__ branch of the code which handles the > > same brokenness in clang. :-) > > According to Anders Magnusson (he replied on pcc-list) it is sufficient > to refer to r11 as %r11 to make it work. He thinks otherwise of adding > the alias r11 for %r11 in pcc. > > Indeed, with a change of all "r11" to "%r11" in > arch/x86_64/syscall_arch.h > the compilation went through without disabling the separate __syscallN(). Just because it compiled doesn't mean it works. Those warnings about register assignment definitely should be hard errors because the code will do horribly wrong things if the requested constraints are not met. > My goal is a musl-based selfcontained pcc toolchain. > I'd like to also have a tcc-based one but musl seems to be too hard > a target for tcc yet :( sigh. I think tcc has a long ways to go... But pcc was working in the past (at least on 32-bit) and should work. BTW about the mmap2 preprocessor issue, did you raise that with ppc developers too? I think it's a bug on their side but I'm not 100% sure. If the code in musl is not valid C I'll change it, but if it is, I think we should just wait for pcc to get fixed. Rich