qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] stubs: Move qemu_fd_register stub to util/main-loop.c


From: Thomas Huth
Subject: Re: [PATCH] stubs: Move qemu_fd_register stub to util/main-loop.c
Date: Thu, 3 Sep 2020 12:22:53 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0

On 03/09/2020 10.24, Daniel P. Berrangé wrote:
> On Thu, Sep 03, 2020 at 07:45:03AM +0200, Thomas Huth wrote:
>> The linker of MinGW sometimes runs into the following problem:
>>
>> libqemuutil.a(util_main-loop.c.obj): In function `qemu_fd_register':
>> /builds/huth/qemu/build/../util/main-loop.c:331: multiple definition of
>>  `qemu_fd_register'
>> libqemuutil.a(stubs_fd-register.c.obj):/builds/huth/qemu/stubs/fd-register.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
>>
>> qemu_fd_register() is defined in util/main-loop.c for WIN32, so let's simply
>> move the stub also there in the #else part of the corresponding #ifndef
>> to fix this problem.
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>>  stubs/fd-register.c | 6 ------
>>  stubs/meson.build   | 1 -
>>  util/main-loop.c    | 4 ++++
> 
>>  3 files changed, 4 insertions(+), 7 deletions(-)
>>  delete mode 100644 stubs/fd-register.c
> 
> The util/meson.build only adds main-loop.c under 'if have_block'.
> 
> Since you didn't remove that conditional, I assume that nothing
> built in a "if not have_block" scenario was relying on the existing
> stub ?

Right, as far as I can see, this is not used by the linux-user or
bsd-user builds, and since

 have_block = have_system or have_tools

we should be fine without the separate stub.

> Assuming the answer is yes and/or CI passes 

CI compilation succeeded here:

 https://gitlab.com/huth/qemu/-/pipelines/185094808
 (the failed acceptance test is something different)

and:

 https://cirrus-ci.com/build/4756242964938752

> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>

Thanks!

 Thomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]