diff mbox

[6/8] osdep.h: Include config-target.h if NEED_CPU_H is defined

Message ID 1455818725-7647-7-git-send-email-peter.maydell@linaro.org
State New
Headers show

Commit Message

Peter Maydell Feb. 18, 2016, 6:05 p.m. UTC
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>
---
 include/qemu/osdep.h | 3 +++
 1 file changed, 3 insertions(+)

Comments

Eric Blake Feb. 18, 2016, 7:09 p.m. UTC | #1
On 02/18/2016 11:05 AM, Peter Maydell wrote:
> 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>
> ---
>  include/qemu/osdep.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
> index c1b413d..80c62be 100644
> --- a/include/qemu/osdep.h
> +++ b/include/qemu/osdep.h
> @@ -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"

Reviewed-by: Eric Blake <eblake@redhat.com>
diff mbox

Patch

diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index c1b413d..80c62be 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -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