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