From d414eb3e7fc1e82d68e69ba6a9a867b9d9a9dba2 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Mon, 28 Jun 2021 22:07:44 -0400
Subject: sim: move default model to the runtime sim state

This kills off another compile-time option by moving the setting to
the individual arch runtimes.  This will allow dynamic selection by
the arch when doing a single build with multiple arches.

The sim_model_init rework is a little funky.  In the past it was
disabled entirely if no default model was set.  We maintain the
spirit of the logic by gating the fallback logic on whether the
port has defined any models.
---
 sim/lm32/sim-if.c | 1 +
 1 file changed, 1 insertion(+)

(limited to 'sim/lm32/sim-if.c')

diff --git a/sim/lm32/sim-if.c b/sim/lm32/sim-if.c
index abb9ad7..f9143ea 100644
--- a/sim/lm32/sim-if.c
+++ b/sim/lm32/sim-if.c
@@ -95,6 +95,7 @@ sim_open (SIM_OPEN_KIND kind, host_callback *callback, struct bfd *abfd,
 
   /* Set default options before parsing user options.  */
   STATE_MACHS (sd) = lm32_sim_machs;
+  STATE_MODEL_NAME (sd) = "lm32";
   current_alignment = STRICT_ALIGNMENT;
   current_target_byte_order = BFD_ENDIAN_BIG;
 
-- 
cgit v1.1