Skip to content
  • Thomas Huth's avatar
    b0476d66
    stubs: Move qemu_timer_notify_cb() and remove qemu_notify_event() stub · b0476d66
    Thomas Huth authored
    
    
    When cross-compiling with MinGW, there are sometimes some weird linker
    errors like:
    
    ibqemuutil.a(util_main-loop.c.obj): In function `qemu_notify_event':
    /builds/huth/qemu/build/../util/main-loop.c:139: multiple definition of
     `qemu_notify_event'
    libqemuutil.a(stubs_notify-event.c.obj):/builds/huth/qemu/stubs/notify-event.c:5:
     first defined here
    collect2: error: ld returned 1 exit status
    /builds/huth/qemu/rules.mak:88: recipe for target 'tests/test-timed-average.exe'
     failed
    
    It seems like it works better when the qemu_timer_notify_cb() stub (which
    calls qemu_notify_event()) is in a separate file - then we can also even
    remove the qemu_notify_event() stub now.
    
    This patch is based on ideas from the patch "stubs: Remove qemu_notify_event()"
    by Philippe Mathieu-Daudé and the patch "cpu-timers, icount: new modules" from
    Claudio Fontana.
    
    Message-Id: <20200902102433.304737-1-thuth@redhat.com>
    Acked-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
    b0476d66
    stubs: Move qemu_timer_notify_cb() and remove qemu_notify_event() stub
    Thomas Huth authored
    
    
    When cross-compiling with MinGW, there are sometimes some weird linker
    errors like:
    
    ibqemuutil.a(util_main-loop.c.obj): In function `qemu_notify_event':
    /builds/huth/qemu/build/../util/main-loop.c:139: multiple definition of
     `qemu_notify_event'
    libqemuutil.a(stubs_notify-event.c.obj):/builds/huth/qemu/stubs/notify-event.c:5:
     first defined here
    collect2: error: ld returned 1 exit status
    /builds/huth/qemu/rules.mak:88: recipe for target 'tests/test-timed-average.exe'
     failed
    
    It seems like it works better when the qemu_timer_notify_cb() stub (which
    calls qemu_notify_event()) is in a separate file - then we can also even
    remove the qemu_notify_event() stub now.
    
    This patch is based on ideas from the patch "stubs: Remove qemu_notify_event()"
    by Philippe Mathieu-Daudé and the patch "cpu-timers, icount: new modules" from
    Claudio Fontana.
    
    Message-Id: <20200902102433.304737-1-thuth@redhat.com>
    Acked-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: default avatarThomas Huth <thuth@redhat.com>
Loading