qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Alexander Bulekov <alxndr@bu.edu>
Cc: Darren Kenny <darren.kenny@oracle.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	qemu-devel@nongnu.org, Igor Mammedov <imammedo@redhat.com>
Subject: Re: [PATCH-for-6.0] hw/mem/meson: Fix linking sparse-mem device with fuzzer
Date: Mon, 12 Apr 2021 13:07:28 +0200	[thread overview]
Message-ID: <31e0de30-c461-33d5-9f12-0f2505aed049@redhat.com> (raw)
In-Reply-To: <20210406143928.shfhgsdupbjqgohc@mozz.bu.edu>

ping?

On 4/6/21 4:39 PM, Alexander Bulekov wrote:
> On 210406 1539, Philippe Mathieu-Daudé wrote:
>> sparse-mem.c is added to the 'mem_ss' source set, which itself
>> is conditionally added to softmmu_ss if CONFIG_MEM_DEVICE is
>> selected.
>> But if CONFIG_MEM_DEVICE isn't selected, we get a link failure
>> even if CONFIG_FUZZ is selected:
>>
>>   /usr/bin/ld: tests_qtest_fuzz_generic_fuzz.c.o: in function `generic_pre_fuzz':
>>   tests/qtest/fuzz/generic_fuzz.c:826: undefined reference to `sparse_mem_init'
>>   clang-10: error: linker command failed with exit code 1 (use -v to see invocation)
>>
>> Fix by adding sparse-mem.c directly to the softmmu_ss set.
>>
>> Fixes: 230376d285b ("memory: add a sparse memory device for fuzzing")
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> 
> Oops..
> Reviewed-by: Alexander Bulekov <alxndr@bu.edu>
> 
>> ---
>>  hw/mem/meson.build | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/hw/mem/meson.build b/hw/mem/meson.build
>> index ef79e046787..3c8fdef9f9e 100644
>> --- a/hw/mem/meson.build
>> +++ b/hw/mem/meson.build
>> @@ -1,8 +1,9 @@
>>  mem_ss = ss.source_set()
>>  mem_ss.add(files('memory-device.c'))
>> -mem_ss.add(when: 'CONFIG_FUZZ', if_true: files('sparse-mem.c'))
>>  mem_ss.add(when: 'CONFIG_DIMM', if_true: files('pc-dimm.c'))
>>  mem_ss.add(when: 'CONFIG_NPCM7XX', if_true: files('npcm7xx_mc.c'))
>>  mem_ss.add(when: 'CONFIG_NVDIMM', if_true: files('nvdimm.c'))
>>  
>>  softmmu_ss.add_all(when: 'CONFIG_MEM_DEVICE', if_true: mem_ss)
>> +
>> +softmmu_ss.add(when: 'CONFIG_FUZZ', if_true: files('sparse-mem.c'))
>> -- 
>> 2.26.3
>>
>>
> 



  reply	other threads:[~2021-04-12 11:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-06 13:39 Philippe Mathieu-Daudé
2021-04-06 13:40 ` Philippe Mathieu-Daudé
2021-04-06 14:39 ` Alexander Bulekov
2021-04-12 11:07   ` Philippe Mathieu-Daudé [this message]
2021-05-11  3:48     ` Philippe Mathieu-Daudé
2021-05-13 16:10       ` Laurent Vivier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=31e0de30-c461-33d5-9f12-0f2505aed049@redhat.com \
    --to=philmd@redhat.com \
    --cc=alxndr@bu.edu \
    --cc=darren.kenny@oracle.com \
    --cc=imammedo@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --subject='Re: [PATCH-for-6.0] hw/mem/meson: Fix linking sparse-mem device with fuzzer' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).