diff mbox series

[1/2] target/arm: Only include tcg/oversized-guest.h if CONFIG_TCG

Message ID 20230606224609.208550-2-richard.henderson@linaro.org
State Superseded
Headers show
Series target/arm: Fix --disable-tcg build | expand

Commit Message

Richard Henderson June 6, 2023, 10:46 p.m. UTC
Fixes the build for --disable-tcg.

This header is only needed for cross-hosting.  Without CONFIG_TCG,
we know this is an AArch64 host, CONFIG_ATOMIC64 will be set, and
the TCG_OVERSIZED_GUEST block will never be compiled.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/arm/ptw.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Philippe Mathieu-Daudé June 7, 2023, 7:46 a.m. UTC | #1
On 7/6/23 00:46, Richard Henderson wrote:
> Fixes the build for --disable-tcg.
> 
> This header is only needed for cross-hosting.  Without CONFIG_TCG,
> we know this is an AArch64 host, CONFIG_ATOMIC64 will be set, and
> the TCG_OVERSIZED_GUEST block will never be compiled.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   target/arm/ptw.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
diff mbox series

Patch

diff --git a/target/arm/ptw.c b/target/arm/ptw.c
index b2dc223525..37bcb17a9e 100644
--- a/target/arm/ptw.c
+++ b/target/arm/ptw.c
@@ -14,8 +14,9 @@ 
 #include "cpu.h"
 #include "internals.h"
 #include "idau.h"
-#include "tcg/oversized-guest.h"
-
+#ifdef CONFIG_TCG
+# include "tcg/oversized-guest.h"
+#endif
 
 typedef struct S1Translate {
     ARMMMUIdx in_mmu_idx;