diff mbox

Re: [PATCH v2] Makefile: poison TARGET_xxx for compile once.

Message ID 4C246246.8030903@redhat.com
State New
Headers show

Commit Message

Paolo Bonzini June 25, 2010, 8:01 a.m. UTC
On 06/25/2010 05:02 AM, Isaku Yamahata wrote:
> poison TARGET_xxx for compile once object
> to prevent those ifdef from creeping in again.
>
> didn't poison env which is used as function argument as void *env.
> Although it would be possible to sort it out, for now just not poison it.
>
> qemu-malloc.c didn't compile, so I make it non compile-once for now.
> It is linked via block-obj-y in Makefile.obj and common-obj-y in
> Makefile.objs through block-obj-y. So qemu-malloc.o is explicitly
> added to rules.

I'm still skeptical, not about the goal but about the means.

I'm going to push again for my patch to make CPUState opaque for 
non-per-target files.

I haven't heard good reasons against it.  The main objection was that hw 
files would have no reason for accessing CPUState.  But this makes no 
sense if CPUState is opaque, and on the other hand we have now a 
proliferation of void* arguments and fields (e.g. in qemu_cpu_kick). 
Which I am taught is a very bad thing.

If that patch was accepted, we'd just need this to implement your proposal:

  /* bottom halves */


I'll put this together in a complete patch series and post.

Paolo
diff mbox

Patch

diff --git a/cpu-common.h b/cpu-common.h
index f325e60..78f8b12 100644
--- a/cpu-common.h
+++ b/cpu-common.h
@@ -11,10 +11,6 @@ 
  #include "targphys.h"
  #endif

-#ifndef NEED_CPU_H
-#include "poison.h"
-#endif
-
  #include "bswap.h"
  #include "qemu-queue.h"

diff --git a/qemu-common.h b/qemu-common.h
index 3fb2f0b..3f92d40 100644
--- a/qemu-common.h
+++ b/qemu-common.h
@@ -90,15 +90,12 @@  static inline char *realpath(const char *path, char 
*resolved_path)

  /* FIXME: Remove NEED_CPU_H.  */
  #ifndef NEED_CPU_H
-
  #include <setjmp.h>
  #include "osdep.h"
  #include "bswap.h"
-
+#include "poison.h"
  #else
-
  #include "cpu.h"
-
  #endif /* !defined(NEED_CPU_H) */