]> git.proxmox.com Git - mirror_qemu.git/commitdiff
meson: fix libqos linking
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 2 Sep 2020 10:30:40 +0000 (06:30 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 8 Sep 2020 05:17:09 +0000 (07:17 +0200)
Add genh to the sources to avoid race conditions between QAPI
file generation and libqos compilation.

Make the name_suffix .fa for consistency with other link_whole
static libraries and to work around a Meson issue where
lots of linker flags are placed between -Wl,--start-group and
-Wl,--end-group and this breaks the fork-fuzz.ld linker script.

Reported-by: Claudio Fontana <cfontana@suse.de>
Reported-by: Alexander Bulekov <alxndr@bu.edu>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tests/qtest/libqos/meson.build

index 19931b9248eb10ab0d9cbfd4ed8d485a3580c5df..1cddf5bdaa1c6a299677c225d85988c547ae3b57 100644 (file)
@@ -1,5 +1,4 @@
-libqos = static_library('qos',
-  files('../libqtest.c',
+libqos_srcs = files('../libqtest.c',
         'qgraph.c',
         'qos_external.c',
         'pci.c',
@@ -52,6 +51,10 @@ libqos = static_library('qos',
         'arm-xilinx-zynq-a9-machine.c',
         'ppc64_pseries-machine.c',
         'x86_64_pc-machine.c',
-), build_by_default: false)
+)
+
+libqos = static_library('qos', libqos_srcs + genh,
+                        name_suffix: 'fa',
+                        build_by_default: false)
 
 qos = declare_dependency(link_whole: libqos)