On 200826 1715, Paolo Bonzini wrote: > On Wed, Aug 26, 2020 at 3:56 PM Alexander Bulekov <alx...@bu.edu> wrote: > > > > On 200825 0958, Paolo Bonzini wrote: > > > Il lun 24 ago 2020, 00:58 Alexander Bulekov <alx...@bu.edu> ha scritto: > > > > > > > Hi Paolo, > > > > Our oss-fuzz builds started failing, after the meson merge. I think I > > > > tracked down the issues: > > > > 1.) Looking at the build-log here: > > > > > > > > https://oss-fuzz-build-logs.storage.googleapis.com/log-d43d402c-1ce5-4422-b3db-ccbf83a862a0.txt > > > > The error happens at link-time. Re-running the build with V=1: > > > > "/usr/bin/ld" ... > > > > --whole-archive > > > > /usr/local/lib/clang/12.0.0/.../libclang_rt.asan-x86_64.a \ > > > > --start-group ..... -T /src/qemu/tests/qtest/fuzz/fork_fuzz.ld \ > > > > -wrap qtest_inb -wrap qtest_inw ..... --end-group ..... > > > > > > > > > > I think you can put everything into a response for and include it with > > > @fuzz.cmd in the command line. > > > > I don't think I understand. Should I provide the entire linker command, > > by email? > > You can create a file fuzz.cmd.in containing > > -Wl,-T,@FUZZING_LINKER_SCRIPT@ > -Wl,-wrap,qtest_inb > -Wl,-wrap,qtest_inw > > etc. > > Create a fuzz.cmd that includes the correct path to fuzz.ld in the > source tree (using configure_file) and pass this file to the linker > using @tests/libqtest/fuzz/fuzz.cmd in link_args (and also > link_depends). See libblock and block for an example.
I'm not sure whether this solves the problem that the linker-script is placed in between --start-group and --end-group arguments. It seems that no matter what I do to specify the linker script with -Wl,-T, and link_args, the flag ends up placed between --start-group and --end-group due to some parsing that meson does in mesonbuild/compilers/mixins/clike.py. Relevant: https://github.com/mesonbuild/meson/pull/7505 -Alex > Paolo > > Paolo >