From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/5821 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: compiling musl on x86_64 linux with ppc Date: Wed, 13 Aug 2014 11:49:10 +0200 Message-ID: <20140813094910.GN22308@port70.net> References: <20140813091843.GD5170@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 1407923369 24134 80.91.229.3 (13 Aug 2014 09:49:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Aug 2014 09:49:29 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-5827-gllmg-musl=m.gmane.org@lists.openwall.com Wed Aug 13 11:49:22 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 1XHVBK-0001Gd-RH for gllmg-musl@plane.gmane.org; Wed, 13 Aug 2014 11:49:22 +0200 Original-Received: (qmail 3202 invoked by uid 550); 13 Aug 2014 09:49:22 -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 3194 invoked from network); 13 Aug 2014 09:49:22 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: <20140813091843.GD5170@example.net> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:5821 Archived-At: * u-igbb@aetey.se [2014-08-13 11:18:43 +0200]: > pcc -std=c99 -nostdinc -ffreestanding -fexcess-precision=standard -frounding-math -D_XOPEN_SOURCE=700 -I./arch/x86_64 -I./src/internal -I./include -Os -pipe -fomit-frame-pointer -fno-unwind-tables -fno-asynchronous-unwind-tables -Wa,--noexecstack -Werror=implicit-function-declaration -Werror=implicit-int -Werror=pointer-sign -Werror=pointer-arith -fno-stack-protector -c -o src/aio/aio_readwrite.o src/aio/aio_readwrite.c > ./arch/x86_64/syscall_arch.h, line 37: warning: no register assignment (yet) > ./arch/x86_64/syscall_arch.h, line 46: warning: no register assignment (yet) > ./arch/x86_64/syscall_arch.h, line 47: warning: no register assignment (yet) > ./arch/x86_64/syscall_arch.h, line 56: warning: no register assignment (yet) > ./arch/x86_64/syscall_arch.h, line 57: warning: no register assignment (yet) > ./arch/x86_64/syscall_arch.h, line 58: warning: no register assignment (yet) > 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? > there is a way around: instead of the inline functions in syscall_arch.h use extern asm implementations or just call the generic __syscall (it will be less efficient than inline asm syscall, but pcc is not very good at optimizations anyway) eg. in syscall_arch.h change static __inline long __syscall1(long n, long a1) { unsigned long ret; __asm__ __volatile__ ("syscall" : "=a"(ret) : "a"(n), "D"(a1) : "rcx", "r11", "memory"); return ret; } into static __inline long __syscall1(long n, long a1) { return (__syscall)(n, a1); } etc