On 01/09/20 20:18, Alexander Bulekov wrote: > --- > configure | 12 ++++++++++-- > meson.build | 6 +++++- > tests/qtest/fuzz/meson.build | 5 ++--- > 3 files changed, 17 insertions(+), 6 deletions(-) > > > Hi Paolo, > Here I'm trying to specify the linker-script with > add_project_link_arguments. How I'm testing this: > > $ CC=clang-10 CXX=clang++-10 ../configure --enable-fuzzing > $ make V=1 "-j$(nproc)" qemu-fuzz-i386 > > clang++-10 -o qemu-fuzz-i386 > qemu-fuzz-i386.p/tests_qtest_fuzz_qtest_wrappers.c.o \ > ... libblock.fa chardev/libchardev.fa \ > -Wl,--start-group tests/qtest/libqos/libqos.a -Wl,--no-whole-archive \ > -Wl,-T,/home/alxndr/Development/qemu/tests/qtest/fuzz/fork_fuzz.ld \ > ... \ > -Wl,-rpath-link,/home/alxndr/Development/qemu/build/ -lstdc++ -Wl,--end-group > > Maybe if I can get the oss-fuzz LIB_FUZZING_ENGINE > (/usr/lib/libFuzzingEngine.a) into the --start-group, that could also > solve the issue... I'll take another look at exactly what the oss-fuzz > build container does.
Actually your patch is pretty close, just by hacking diff --git a/tests/qtest/libqos/meson.build b/tests/qtest/libqos/meson.build index 19931b9248..2bc46c5a84 100644 --- a/tests/qtest/libqos/meson.build +++ b/tests/qtest/libqos/meson.build @@ -52,6 +52,6 @@ libqos = static_library('qos', 'arm-xilinx-zynq-a9-machine.c', 'ppc64_pseries-machine.c', 'x86_64_pc-machine.c', -), build_by_default: false) +), name_suffix: 'fa', build_by_default: false) qos = declare_dependency(link_whole: libqos) I can get it to work. Better find a way to fix it in Meson though, because relying on the ".a" suffix is very brittle. Paolo