On 4/27/21 12:26 PM, Philippe Mathieu-Daudé wrote:
When building only the leon3 machine, we get this link failure:

   /usr/bin/ld: target_sparc_win_helper.c.o: in function `cpu_put_psr':
   target/sparc/win_helper.c:91: undefined reference to `cpu_check_irqs'

This is because cpu_check_irqs() is defined in hw/sparc/sun4m.c,
which is only built if the base sun4m machines are built (with
the CONFIG_SUN4M selector).

Fix by moving cpu_check_irqs() out of hw/sparc/sun4m.c and build
it unconditionally.

Signed-off-by: Philippe Mathieu-Daudé<f4...@amsat.org>
---
  hw/sparc/irq.c       | 61 ++++++++++++++++++++++++++++++++++++++++++++
  hw/sparc/sun4m.c     | 32 -----------------------
  hw/sparc/meson.build |  1 +
  3 files changed, 62 insertions(+), 32 deletions(-)
  create mode 100644 hw/sparc/irq.c

I think this code should be in target/sparc/. There doesn't seem to be any reference to anything outside CPUSPARCState.


r~

Reply via email to