system: Convert qemu_arch_available() to TargetInfo API
PATCH v2 1/1 system: Convert qemu_arch_available() to TargetInfo API
Get the base arch_mask from the current SysEmuTarget, making qemu_arch_available() target-agnostic.
We don't need the per-target QEMU_ARCH definition anymore, remove it.
Signed-off-by Philippe Mathieu-Daudé <[email protected]>
---
v2: Prefer switch over array (pbo)
--- meson.build | 2 -- system/arch_init.c | 30 ----------------- target-info.c | 83 ++++++++++++++++++++++++++++++++++++++++++++++ system/meson.build | 1 - 4 files changed, 83 insertions(+), 33 deletions(-) delete mode 100644 system/arch_init.c
meson.build +0 -2
@@ -3419,8 +3419,6 @@ foreach target : target_dirs config_target_data.set(k, v) endif endforeach - config_target_data.set('QEMU_ARCH', - 'QEMU_ARCH_' + config_target['TARGET_BASE_ARCH'].to_upper()) config_target_h += {target: configure_file(output: target + '-config-target.h', configuration: config_target_data)}
system/arch_init.c deleted +0 -30
@@ -1,30 +0,0 @@ -/* -* QEMU System Emulator -* -* Copyright (c) 2003-2008 Fabrice Bellard -* -* Permission is hereby granted, free of charge, to any person obtaining a copy -* of this software and associated documentation files (the "Software"), to deal -* in the Software without restriction, including without limitation the rights -* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -* copies of the Software, and to permit persons to whom the Software is -* furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in -* all copies or substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -* THE SOFTWARE. -*/ -#include "qemu/osdep.h" -#include "system/arch_init.h" - -bool qemu_arch_available (unsigned qemu_arch_mask) -{ -return qemu_arch_mask &QEMU_ARCH ; -}
target-info.c +83 -0
95 lines not on this page · raw message
system/meson.build +0 -1
@@ -1,5 +1,4 @@ specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_true: [files( - 'arch_init.c', 'globals-target.c', )])
Signature · 1 line
2.52.0