mos6522: fix linking error when CONFIG_MOS6522 is not set
PATCH v2 1/1 mos6522: fix linking error when CONFIG_MOS6522 is not set
When CONFIG_MOS6522 is not set, building ppc64-softmmu target fails:
/usr/bin/ld: libqemu-ppc64-softmmu.fa.p/monitor_misc.c.o:(.data+0x1158): undefined reference to `hmp_info_via'
Make devices configuration available in hmp-commands*.hx and check for CONFIG_MOS6522.
---
v2:
- Included devices configuration in monitor/misc.c
v1:
- https://lore.kernel.org/qemu-devel/[email protected]/
hmp-commands-info.hx | 2 ++ monitor/misc.c | 3 +++ 2 files changed, 5 insertions(+)
hmp-commands-info.hx +2 -0
@@ -881,6 +881,7 @@ SRST ERST #if defined(TARGET_M68K) || defined(TARGET_PPC) +#if defined(CONFIG_MOS6522) { .name = "via", .args_type = "",
@@ -889,6 +890,7 @@ ERST .cmd = hmp_info_via, }, #endif +#endif SRST ``info via``
monitor/misc.c +3 -0
@@ -84,6 +84,9 @@#include "hw/s390x/storage-attributes.h" #endif +/* Make devices configuration available for use in hmp-commands*.hx templates */ +#include CONFIG_DEVICES +/* file descriptors passed via SCM_RIGHTS */ typedef struct mon_fd_t mon_fd_t ;struct mon_fd_t {
Signature · 1 line
2.35.1
Quoted 27 lines · Murilo Opsfelder Araujo
When
CONFIG_MOS6522is not set, building ppc64-softmmu target fails:/usr/bin/ld: libqemu-ppc64-softmmu.fa.p/monitor_misc.c.o:(.data+0x1158): undefined reference to `hmp_info_via'Make devices configuration available in hmp-commands*.hx and check for
CONFIG_MOS6522.Fixes 409e9f7131e5 (mos6522: add "info via" HMP command for debugging)Signed-off-by Murilo Opsfelder Araujo <[email protected]>Cc Mark Cave-Ayland <[email protected]>Cc Fabiano Rosas <[email protected]>---
v2:
- Included devices configuration inmonitor/misc.cv1:
- https://lore.kernel.org/qemu-devel/[email protected]/hmp-commands-info.hx | 2 ++ monitor/misc.c | 3 +++ 2 files changed, 5 insertions(+)hmp-commands-info.hx +0
-0
hmp-commands-info.hx SRST · line 884
Quoted 4 lines
hmp-commands-info.hx +1
-0@@ -881,6 +881,7 @@ SRST ERST #if defined(TARGET_M68K) || defined(TARGET_PPC) +#if defined(CONFIG_MOS6522)
I think you could even get rid of the TARGET_ stuff now that the CONFIG line works!
Quoted 16 lines
hmp-commands-info.hx +1
-0{ .name = "via", .args_type = "",@@ -889,6 +890,7 @@ ERST .cmd = hmp_info_via, }, #endif +#endif SRST ``info via``monitor/misc.c +0
-0
monitor/misc.c line 88
Quoted 5 lines
monitor/misc.c +2
-0@@ -84,6 +84,9 @@#include "hw/s390x/storage-attributes.h" #endif +/* Make devices configuration available for use in hmp-commands*.hx templates */ +#include CONFIG_DEVICES
Looks reasonable to me.
So with the "#if defined(TARGET_M68K) || defined(TARGET_PPC)" removed:
Hi, Thomas.
Quoted 56 lines · Thomas Huth
Quoted 27 lines · Murilo Opsfelder Araujo
When
CONFIG_MOS6522is not set, building ppc64-softmmu target fails:
/usr/bin/ld: libqemu-ppc64-softmmu.fa.p/monitor_misc.c.o:(.data+0x1158): undefined reference to `hmp_info_via'Make devices configuration available in hmp-commands*.hx and check for
CONFIG_MOS6522.Fixes 409e9f7131e5 (mos6522: add "info via" HMP command for debugging)Signed-off-by Murilo Opsfelder Araujo <[email protected]>Cc Mark Cave-Ayland <[email protected]>Cc Fabiano Rosas <[email protected]>---
v2:
- Included devices configuration inmonitor/misc.cv1:
- https://lore.kernel.org/qemu-devel/[email protected]/hmp-commands-info.hx | 2 ++
monitor/misc.c | 3 +++2 files changed, 5 insertions(+)hmp-commands-info.hx +0
-0@@ -881,6 +881,7 @@ SRSTQuoted 3 lines
ERST
#ifdefined(TARGET_M68K)||defined(TARGET_PPC)
+#ifdefined(CONFIG_MOS6522)I think you could even get rid of the
TARGET_stuff now that the CONFIG line works!Quoted 15 lines
{
.name = "via",
.args_type = "",hmp-commands-info.hx +1
-0@@ -889,6 +890,7 @@ ERST .cmd = hmp_info_via, }, #endif +#endifSRST
``info via``monitor/misc.c +0
-0monitor/misc.c line 87
Quoted 4 lines
monitor/misc.c +2
-0@@ -84,6 +84,9 @@ #include "hw/s390x/storage-attributes.h" #endif +/* Make devices configuration available for use in hmp-commands*.hx templates */ +#include CONFIG_DEVICES Looks reasonable to me.
Quoted 4 lines
So with the "#if
defined(TARGET_M68K)||defined(TARGET_PPC)" removed:Reviewed-by Thomas Huth <[email protected]>
I've sent v3 with your suggestion:
https://lore.kernel.org/qemu-devel/[email protected]/
Thank you for your review.
Signature · 1 line
Murilo