[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] compilation fix

From: Mattias Nissler
Subject: [Qemu-devel] compilation fix
Date: Tue, 10 Jan 2006 02:11:59 +0100


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.


--- 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.  */

reply via email to

[Prev in Thread] Current Thread [Next in Thread]