From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2074 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: musl mips fails to compile with gcc 3.4.6 Date: Wed, 10 Oct 2012 20:07:39 -0400 Message-ID: <20121011000738.GT254@brightrain.aerifal.cx> References: <5075EDDD.1080904@barfooze.de> 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 1349914584 3234 80.91.229.3 (11 Oct 2012 00:16:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Oct 2012 00:16:24 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2075-gllmg-musl=m.gmane.org@lists.openwall.com Thu Oct 11 02:16:31 2012 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 1TM6Ru-0004e0-U1 for gllmg-musl@plane.gmane.org; Thu, 11 Oct 2012 02:16:27 +0200 Original-Received: (qmail 21732 invoked by uid 550); 11 Oct 2012 00:16:20 -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 21724 invoked from network); 11 Oct 2012 00:16:20 -0000 Content-Disposition: inline In-Reply-To: <5075EDDD.1080904@barfooze.de> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:2074 Archived-At: On Wed, Oct 10, 2012 at 11:51:25PM +0200, John Spencer wrote: > src/aio/aio_readwrite.c: In function `io_thread': > ../arch/mips/pthread_arch.h:7: error: impossible constraint in `asm' > __asm__ __volatile__ (".word 0x7c03e83b" : "=v" (self) ); > > > #ifdef __clang__ > > --> > > #if defined(__clang__) || (defined(__GNUC__) && (__GNUC__ < 4)) > > fixes it I have a potential alternate fix: using register pthread_t self __asm__("$3"); and "=r"(self) as the constraint. This should work on any gcc version without incurring the extra cost of the clang-workaround. And it will work with clang too if they ever fix their register allocator to work with this kind of code. Can you confirm whether or not it works? Rich