@samitouri / QOSamiQemu / commits / 32a38529c4

system/globals: Build as common code

Now that all targets have the graphic dimension variables initialized the same way, we can move them to the common file unit, having them built once. Remove the now empty globals-target.c file. The command line '-g WxH[xD]' option is not changed and behaves the same. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20260216213121.47122-9-philmd@linaro.org>

Philippe Mathieu-Daudé committed Feb 11, 2026 at 16:03 UTC 32a38529c46e84c22b8d00dc26917f4695a416c3
3 files changed +3 -15
system/globals-target.c deleted
-14
@@ -1,14 +0,0 @@
1 -/*
2 - * Global variables that should not exist (target specific)
3 - *
4 - * Copyright (c) 2003-2008 Fabrice Bellard
5 - *
6 - * SPDX-License-Identifier: MIT
7 - */
8 -
9 -#include "qemu/osdep.h"
10 -#include "system/system.h"
11 -
12 -int graphic_width;
13 -int graphic_height;
14 -int graphic_depth;
system/globals.c
+3
@@ -49,6 +49,9 @@ bool enable_cpu_pm;
49 int autostart = 1;
50 int vga_interface_type = VGA_NONE;
51 bool vga_interface_created;
52 +int graphic_width;
53 +int graphic_height;
54 +int graphic_depth;
55 Chardev *parallel_hds[MAX_PARALLEL_PORTS];
56 QEMUOptionRom option_rom[MAX_OPTION_ROMS];
57 int nb_option_roms;
system/meson.build
-1
@@ -1,6 +1,5 @@
1 specific_ss.add(when: 'CONFIG_SYSTEM_ONLY', if_true: [files(
2 'arch_init.c',
3 - 'globals-target.c',
3 )])
4
5 system_ss.add(files(