OSDN Git Service

osdep.h: Include config-target.h if NEED_CPU_H is defined
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 23 Feb 2016 11:58:02 +0000 (11:58 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 23 Feb 2016 12:43:05 +0000 (12:43 +0000)
NEED_CPU_H is the define we use to distinguish per-target object
compilation from common object compilation. For the former, we must
also include config-target.h so that the .c files see the necessary
CONFIG_ constants.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
include/qemu/osdep.h

index 7c3a073..4538fdc 100644 (file)
@@ -26,6 +26,9 @@
 #define QEMU_OSDEP_H
 
 #include "config-host.h"
+#ifdef NEED_CPU_H
+#include "config-target.h"
+#endif
 #include "qemu/compiler.h"
 
 /* Older versions of C++ don't get definitions of various macros from