Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M2yWx-0001sI-8i for qemu-devel@nongnu.org; Sat, 09 May 2009 22:12:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M2yWs-0001rM-Ol for qemu-devel@nongnu.org; Sat, 09 May 2009 22:12:42 -0400 Received: from [199.232.76.173] (port=55374 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M2yWs-0001rJ-JB for qemu-devel@nongnu.org; Sat, 09 May 2009 22:12:38 -0400 Received: from speedy.comstyle.com ([206.51.28.2]:9912 helo=mail.comstyle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M2yWs-0000sG-Cb for qemu-devel@nongnu.org; Sat, 09 May 2009 22:12:38 -0400 Received: from booyah.home.comstyle.com (unknown [IPv6:2001:470:b01e:3:216:41ff:fe17:6933]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: brad) by mail.comstyle.com (Postfix) with ESMTPSA id D812098407 for ; Sat, 9 May 2009 22:12:19 -0400 (EDT) Date: Sat, 9 May 2009 22:12:18 -0400 From: Brad Subject: Re: [Qemu-devel] QEMU TCG code does not build with OpenBSD PowerPC Message-ID: <20090510021217.GA26523@booyah.home.comstyle.com> References: <200904100821.10439.brad@comstyle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Sat, Apr 11, 2009 at 10:58:06AM +0400, malc wrote: > On Fri, 10 Apr 2009, Brad wrote: > > > Trying to build on an OpenBSD PowerPC machine dies pretty quickly > > in the TCG PowerPC code.. > > > > CC i386-softmmu/exec.o > > In file included from /usr/obj/ports/qemu-0.10.2/qemu-0.10.2/tcg/tcg.h:24, > > from /usr/obj/ports/qemu-0.10.2/qemu-0.10.2/exec.c:39: > > /usr/obj/ports/qemu-0.10.2/qemu-0.10.2/tcg/ppc/tcg-target.h:76:2: #error > > Unsupported system > > gmake[1]: *** [exec.o] Error 1 > > > > Any help with this? > > You need to know which ABI OpenBSD/PPC uses. A shot in the dark would be > to try something like: After speaking to the PowerPC maintainer to double check, we're using the standard SVR4 ABI so this should be good.. Also as far as I know this should also apply to FreeBSD and NetBSD when running on PowerPC, but I'll leave it at this for now. --- tcg/ppc/tcg-target.c.orig Fri May 8 02:39:52 2009 +++ tcg/ppc/tcg-target.c Fri May 8 02:41:24 2009 @@ -109,7 +109,7 @@ static const int tcg_target_reg_alloc_order[] = { TCG_REG_R11, #endif TCG_REG_R12, -#ifndef __linux__ +#if !defined(__linux__) && !defined(__OpenBSD__) TCG_REG_R13, #endif TCG_REG_R0, @@ -1535,7 +1535,7 @@ void tcg_target_init(TCGContext *s) #ifndef __APPLE__ tcg_regset_set_reg(s->reserved_regs, TCG_REG_R2); #endif -#ifdef __linux__ +#if defined(__linux__) || defined(__OpenBSD__) tcg_regset_set_reg(s->reserved_regs, TCG_REG_R13); #endif --- tcg/ppc/tcg-target.h.orig Mon Apr 6 22:04:47 2009 +++ tcg/ppc/tcg-target.h Sun Apr 26 20:15:41 2009 @@ -69,7 +69,7 @@ enum { #define TCG_TARGET_CALL_STACK_OFFSET 24 #elif defined _AIX #define TCG_TARGET_CALL_STACK_OFFSET 52 -#elif defined __linux__ +#elif defined __linux__ || defined __OpenBSD__ #define TCG_TARGET_CALL_ALIGN_ARGS 1 #define TCG_TARGET_CALL_STACK_OFFSET 8 #else -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.