Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
---
include/qemu/target-info-impl.h | 3 +++
configs/targets/aarch64-softmmu.c | 1 +
configs/targets/arm-softmmu.c | 1 +
target-info-stub.c | 1 +
4 files changed, 6 insertions(+)
diff --git a/include/qemu/target-info-impl.h b/include/qemu/target-info-impl.h
index d0e8c86176c..e5ef425f2dc 100644
--- a/include/qemu/target-info-impl.h
+++ b/include/qemu/target-info-impl.h
@@ -10,10 +10,13 @@
#define QEMU_TARGET_INFO_IMPL_H
#include "qemu/target-info.h"
+#include "qapi/qapi-types-machine.h"
typedef struct TargetInfo {
/* runtime equivalent of TARGET_NAME definition */
const char *target_name;
+ /* related to TARGET_ARCH definition */
+ SysEmuTarget target_arch;
/* QOM typename machines for this binary must implement */
const char *machine_typename;
} TargetInfo;
diff --git a/configs/targets/aarch64-softmmu.c b/configs/targets/aarch64-softmmu.c
index 375e6fa0b7b..ff89401ea34 100644
--- a/configs/targets/aarch64-softmmu.c
+++ b/configs/targets/aarch64-softmmu.c
@@ -13,6 +13,7 @@
static const TargetInfo target_info_aarch64_system = {
.target_name = "aarch64",
+ .target_arch = SYS_EMU_TARGET_AARCH64,
.machine_typename = TYPE_TARGET_AARCH64_MACHINE,
};
diff --git a/configs/targets/arm-softmmu.c b/configs/targets/arm-softmmu.c
index d4acdae64f3..22ec9e4faa3 100644
--- a/configs/targets/arm-softmmu.c
+++ b/configs/targets/arm-softmmu.c
@@ -13,6 +13,7 @@
static const TargetInfo target_info_arm_system = {
.target_name = "arm",
+ .target_arch = SYS_EMU_TARGET_ARM,
.machine_typename = TYPE_TARGET_ARM_MACHINE,
};
diff --git a/target-info-stub.c b/target-info-stub.c
index 218e5898e7f..e573f5c1975 100644
--- a/target-info-stub.c
+++ b/target-info-stub.c
@@ -12,6 +12,7 @@
static const TargetInfo target_info_stub = {
.target_name = TARGET_NAME,
+ .target_arch = -1,
.machine_typename = TYPE_MACHINE,
};
--
2.47.1