From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ew8BB-00050R-77 for qemu-devel@nongnu.org; Mon, 09 Jan 2006 20:20:05 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ew8B7-00050E-A8 for qemu-devel@nongnu.org; Mon, 09 Jan 2006 20:20:04 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ew8B7-00050B-6m for qemu-devel@nongnu.org; Mon, 09 Jan 2006 20:20:01 -0500 Received: from [213.165.64.21] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.34) id 1Ew8DT-0006bk-SZ for qemu-devel@nongnu.org; Mon, 09 Jan 2006 20:22:28 -0500 From: Mattias Nissler Content-Type: text/plain Date: Tue, 10 Jan 2006 02:11:59 +0100 Message-Id: <1136855520.7810.27.camel@localhost> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] compilation fix Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hi, I'm running the gentoo version of gcc-3.4.5 on my ppc system here. The patch below is required to make qemu compile cleanly for me. The compiler gives me some very unintuitive error message from within an __asm__ statement but the fix is rather trivial. The patch fixes line 746 of linux-user/elfload.c: if (k_platform) NEW_AUX_ENT(AT_PLATFORM, (target_ulong) u_platform); In the original definition NEW_AUX_ENT expanded to several statements of which only the first will be dependant on the if statement above. I guess the patch changes the code to the way it was actually intended. Mattias --- old/linux-user/elfload.c 2006-01-10 01:35:28.000000000 +0100 +++ new/linux-user/elfload.c 2006-01-10 01:35:54.000000000 +0100 @@ -723,9 +723,11 @@ sp -= ((unsigned long)csp & 15UL) / sizeof(*sp); #define NEW_AUX_ENT(id, val) \ +({ \ sp -= 2; \ put_user (id, sp); \ - put_user (val, sp + 1) + put_user (val, sp + 1); \ +}) NEW_AUX_ENT (AT_NULL, 0); /* There must be exactly DLINFO_ITEMS entries here. */