Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LMz9S-0004DN-2e for qemu-devel@nongnu.org; Wed, 14 Jan 2009 01:22:54 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LMz9Q-0004CG-Qb for qemu-devel@nongnu.org; Wed, 14 Jan 2009 01:22:53 -0500 Received: from [199.232.76.173] (port=51246 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LMz9Q-0004By-H4 for qemu-devel@nongnu.org; Wed, 14 Jan 2009 01:22:52 -0500 Received: from bay0-omc3-s19.bay0.hotmail.com ([65.54.246.219]:34292) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LMz9Q-00023S-0U for qemu-devel@nongnu.org; Wed, 14 Jan 2009 01:22:52 -0500 Message-ID: Message-Id: <40789D00-0F5D-4BA5-91D9-582FE3052E2A@hotmail.com> From: C.W. Betts In-Reply-To: Content-Type: multipart/alternative; boundary=Apple-Mail-2-203883361 Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Re: [Qemu-devel] [6292] Do not rely on __powerpc__ being defined as a feature test macro Date: Tue, 13 Jan 2009 23:22:33 -0700 References: 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 --Apple-Mail-2-203883361 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit That fixes compilation on PowerPC, but it breaks PowerPC 64 On Jan 13, 2009, at 4:12 PM, malc wrote: > Revision: 6292 > http://svn.sv.gnu.org/viewvc/? > view=rev&root=qemu&revision=6292 > Author: malc > Date: 2009-01-13 23:12:34 +0000 (Tue, 13 Jan 2009) > > Log Message: > ----------- > Do not rely on __powerpc__ being defined as a feature test macro > > __powerpc__ is not defined on AIX and Darwin, Makefile.target adds > it to CPPFLAGS for target specific code which cache-utils are not. > > Since there's not common definition which can safely be used on all > platforms use HOST_PPC provided by config-host.h > > The problem was originally reported by C. W. Betts > > Modified Paths: > -------------- > trunk/cache-utils.c > trunk/cache-utils.h > > Modified: trunk/cache-utils.c > =================================================================== > --- trunk/cache-utils.c 2009-01-13 21:09:18 UTC (rev 6291) > +++ trunk/cache-utils.c 2009-01-13 23:12:34 UTC (rev 6292) > @@ -1,6 +1,6 @@ > #include "cache-utils.h" > > -#ifdef __powerpc__ > +#ifdef HOST_PPC > struct qemu_cache_conf qemu_cache_conf = { > .dcache_bsize = 16, > .icache_bsize = 16 > @@ -68,4 +68,4 @@ > } > #endif > > -#endif /* __powerpc__ */ > +#endif /* HOST_PPC */ > > Modified: trunk/cache-utils.h > =================================================================== > --- trunk/cache-utils.h 2009-01-13 21:09:18 UTC (rev 6291) > +++ trunk/cache-utils.h 2009-01-13 23:12:34 UTC (rev 6292) > @@ -1,7 +1,9 @@ > #ifndef QEMU_CACHE_UTILS_H > #define QEMU_CACHE_UTILS_H > > -#ifdef __powerpc__ > +#include "config-host.h" > + > +#ifdef HOST_PPC > struct qemu_cache_conf { > unsigned long dcache_bsize; > unsigned long icache_bsize; > > > > --Apple-Mail-2-203883361 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable That fixes compilation on = PowerPC, but it breaks PowerPC 64
On Jan 13, 2009, at 4:12 = PM, malc wrote:

Revision: 6292
=          http://svn.sv.gnu.org/viewvc/?view=3Drev&root=3Dqemu&r= evision=3D6292
Author:   malc
Date: =     2009-01-13 23:12:34 +0000 (Tue, 13 Jan = 2009)

Log Message:
-----------
Do not rely on __powerpc__ = being defined as a feature test macro

__powerpc__ is not defined = on AIX and Darwin, Makefile.target adds
it to CPPFLAGS for target = specific code which cache-utils are not.

Since there's not common = definition which can safely be used on all
platforms use HOST_PPC = provided by config-host.h

The problem was originally reported by = C. W. Betts

Modified Paths:
--------------
=    trunk/cache-utils.c
=    trunk/cache-utils.h

Modified: = trunk/cache-utils.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
--- trunk/cache-utils.c 2009-01-13 21:09:18 UTC (rev = 6291)
+++ trunk/cache-utils.c 2009-01-13 23:12:34 UTC (rev = 6292)
@@ -1,6 +1,6 @@
#include "cache-utils.h"

-#ifdef = __powerpc__
+#ifdef HOST_PPC
struct qemu_cache_conf = qemu_cache_conf =3D {
    .dcache_bsize =3D = 16,
    .icache_bsize =3D 16
@@ -68,4 +68,4 = @@
}
#endif

-#endif /* __powerpc__ */
+#endif /* = HOST_PPC */

Modified: = trunk/cache-utils.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
--- trunk/cache-utils.h 2009-01-13 21:09:18 UTC (rev = 6291)
+++ trunk/cache-utils.h 2009-01-13 23:12:34 UTC (rev = 6292)
@@ -1,7 +1,9 @@
#ifndef QEMU_CACHE_UTILS_H
#define = QEMU_CACHE_UTILS_H

-#ifdef __powerpc__
+#include = "config-host.h"
+
+#ifdef HOST_PPC
struct qemu_cache_conf = {
    unsigned long dcache_bsize;
=     unsigned long = icache_bsize;





= --Apple-Mail-2-203883361--