mbox series

[RFC,00/11] qemu: Remove TARGET_NAME definition

Message ID 20250305005225.95051-1-philmd@linaro.org
Headers show
Series qemu: Remove TARGET_NAME definition | expand

Message

Philippe Mathieu-Daudé March 5, 2025, 12:52 a.m. UTC
Replace all TARGET_NAME uses by target_name() runtime,
then remove the definition and poison it.

While is looks like another cleanup, it is a small step
required for the single binary project.

Alex Bennée (1):
  plugins/loader: populate target_name with target_name()

Philippe Mathieu-Daudé (10):
  system: Extract target-specific globals to their own compilation unit
  system: Open-code qemu_init_arch_modules() using target_name()
  system: Introduce QemuArchBit enum
  system: Replace arch_type global by qemu_arch_available() helper
  include: Expose QemuArchBit enum to user emulation
  include: Declare target_name() in common "qemu/arch_info.h"
  tests/qtest: Replace TARGET_NAME -> target_name()
  user: Replace TARGET_NAME -> target_name()
  qemu: Introduce qemu_arch_name() helper
  qemu: Remove C definitions of TARGET_NAME

 meson.build                     | 10 +++--
 include/exec/poison.h           |  1 -
 include/hw/core/cpu.h           |  2 -
 include/qemu/arch_info.h        | 55 +++++++++++++++++++++++++++
 include/qemu/osdep.h            |  2 +
 include/system/arch_init.h      | 32 ----------------
 arch_info-target.c              | 67 +++++++++++++++++++++++++++++++++
 bsd-user/main.c                 |  9 +++--
 cpu-target.c                    |  5 ---
 hw/core/machine-qmp-cmds.c      |  1 +
 hw/scsi/scsi-disk.c             |  4 +-
 linux-user/main.c               | 12 +++---
 plugins/loader.c                |  3 +-
 system/arch_init.c              | 50 ------------------------
 system/globals-target.c         | 24 ++++++++++++
 system/qdev-monitor.c           |  6 +--
 system/vl.c                     | 14 ++++---
 tests/qtest/fuzz/fuzz.c         |  5 +--
 tests/qtest/fuzz/generic_fuzz.c |  4 +-
 tests/qtest/fuzz/i440fx_fuzz.c  |  5 ++-
 tests/qtest/fuzz/qos_fuzz.c     |  5 ++-
 system/meson.build              |  2 +-
 22 files changed, 195 insertions(+), 123 deletions(-)
 create mode 100644 include/qemu/arch_info.h
 delete mode 100644 include/system/arch_init.h
 create mode 100644 arch_info-target.c
 delete mode 100644 system/arch_init.c
 create mode 100644 system/globals-target.c