stubs: Fix notify-event stub linkage error on MinGW
In commit e4d6d41ce2 we reduced the user-mode object list, but forgot to also change the notify.o stub in the next commit dc70f80fb2. This triggers a linker error while compiling the tests under MinGW:
LINK tests/test-timed-average.exe
libqemuutil.a(main-loop.o): In function `qemu_notify_event':
util/main-loop.c:139: multiple definition of `qemu_notify_event' tests/test-timed-average.o:/builds/huth/qemu/tests/../stubs/notify-event.c:5: first defined here
collect2: error: ld returned 1 exit status
rules.mak:124: recipe for target 'tests/test-timed-average.exe' failed
Correct by placing the stub object between the system emulation / tools guards.
--- stubs/Makefile.objs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
stubs/Makefile.objs +1 -1
@@ -12,7 +12,6 @@ stub-obj-y += isa-bus.o stub-obj-$(CONFIG_LINUX_AIO) += linux-aio.o stub-obj-$(CONFIG_LINUX_IO_URING) += io_uring.o stub-obj-y += monitor-core.o -stub-obj-y += notify-event.o stub-obj-y += pci-bus.o stub-obj-y += qmp_memory_device.o stub-obj-y += qtest.o
@@ -45,6 +44,7 @@ stub-obj-y += iothread.o stub-obj-y += machine-init-done.o stub-obj-y += migr-blocker.o stub-obj-y += monitor.o +stub-obj-y += notify-event.o stub-obj-y += pci-host-piix.o stub-obj-y += ram-block.o stub-obj-y += replay-user.o
Signature · 1 line
2.21.3
Quoted 36 lines · Philippe Mathieu-Daudé
In commit
e4d6d41ce2we reduced the user-mode object list, but forgot to also change the notify.o stub in the next commitdc70f80fb2. This triggers a linker error while compiling the tests under MinGW:LINK tests/test-timed-average.exe
libqemuutil.a(main-loop.o): In function `qemu_notify_event':
util/main-loop.c:139: multiple definition of `qemu_notify_event' tests/test-timed-average.o:/builds/huth/qemu/tests/../stubs/notify-event.c:5: first defined here
collect2: error: ld returned 1 exit status
rules.mak:124: recipe for target 'tests/test-timed-average.exe' failedCorrect by placing the stub object between the system emulation / tools guards.
Fixes dc70f80fb2 ("stubs/Makefile: Reduce the user-mode object list")Reported-by Thomas Huth <[email protected]>Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- stubs/Makefile.objs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)stubs/Makefile.objs +0
-1@@ -12,7 +12,6 @@ stub-obj-y += isa-bus.o stub-obj-$(CONFIG_LINUX_AIO) += linux-aio.o stub-obj-$(CONFIG_LINUX_IO_URING) += io_uring.o stub-obj-y += monitor-core.o -stub-obj-y += notify-event.o stub-obj-y += pci-bus.o stub-obj-y += qmp_memory_device.o stub-obj-y += qtest.o
stubs/Makefile.objs stub-obj-y += iothread.o · line 50
Quoted 7 lines
stubs/Makefile.objs +1
-0@@ -45,6 +44,7 @@ stub-obj-y += iothread.o stub-obj-y += machine-init-done.o stub-obj-y += migr-blocker.o stub-obj-y += monitor.o +stub-obj-y += notify-event.o stub-obj-y += pci-host-piix.o stub-obj-y += ram-block.o stub-obj-y += replay-user.o
self-NACK, this doesn't work as expected =)