qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 4/4] qapi/meson: Restrict machine-specific objects to sysemu


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 4/4] qapi/meson: Restrict machine-specific objects to sysemu
Date: Sat, 5 Feb 2022 00:40:10 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.5.1

On 4/2/22 18:00, Paolo Bonzini wrote:
On 2/4/22 16:29, Philippe Mathieu-Daudé via wrote:
machine/ and net/ are only useful to machines;
block/ and migration/ to machine or tools.

Note we need to keep building machine.json generated sources
on all targets because some want to access X86CPUFeatureWordInfo
from any architecture ¯\_(ツ)_/¯ Otherwise we get on all but
x86 targets:

   /usr/bin/ld: libqemu-i386-linux-user.fa.p/target_i386_cpu.c.o: in function `x86_cpu_get_feature_words':    ../target/i386/cpu.c:4587: undefined reference to `visit_type_X86CPUFeatureWordInfoList'
   collect2: error: ld returned 1 exit status

I suppose you mean "on all but x86 hosts", since it links libqemu-i386-linux-user.fa.p?  But I don't understand how that happens.  Is it related to

{ 'struct': 'DummyForceArrays',
   'data': { 'unused': ['X86CPUFeatureWordInfo'] } }

and if so can DummyForceArrays be moved to machine-target.json together with X86CPUFeatureWordInfo, and under 'if': 'TARGET_I386'?

Err this one is not an *arch* problem, but a user/system one (sorry I
got confused with another one). Here the problem is it is not trivial
to restrict visit_type_X86CPUFeatureWordInfoList() to sysemu.

So machine.json must be in qapi_all_modules[] even if !have_system.



reply via email to

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