linux-user already does this since 2278b93941d4. That same commit just
added them with main() scope to bsd-user. We need the cpu_type, like
linux-user does, to create new CPUs outside of main to support
threading. Move both cpu_model and cpu_type to mirror linux-user/main.c.
Signed-off-by: Warner Losh <imp@bsdimp.com>
---
bsd-user/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bsd-user/main.c b/bsd-user/main.c
index 4d29e13a8f5..1533fd51168 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -62,6 +62,8 @@ intptr_t qemu_host_page_mask;
static bool opt_one_insn_per_tb;
uintptr_t guest_base;
bool have_guest_base;
+static const char *cpu_model;
+static const char *cpu_type;
/*
* When running 32-on-64 we should make sure we can fit all of the possible
* guest address space into a contiguous chunk of virtual host memory.
@@ -251,8 +253,6 @@ adjust_ssize(void)
int main(int argc, char **argv)
{
const char *filename;
- const char *cpu_model;
- const char *cpu_type;
const char *log_file = NULL;
const char *log_mask = NULL;
const char *seed_optarg = NULL;
--
2.45.1