[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 11/16] hw/mem/meson: Fix linking sparse-mem device with fuzzer
From: |
Laurent Vivier |
Subject: |
[PULL 11/16] hw/mem/meson: Fix linking sparse-mem device with fuzzer |
Date: |
Sat, 15 May 2021 12:03:30 +0200 |
From: Philippe Mathieu-Daudé <philmd@redhat.com>
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>
Reviewed-by: Alexander Bulekov <alxndr@bu.edu>
Message-Id: <20210406133944.4193691-1-philmd@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
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 ef79e046787c..3c8fdef9f9e9 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.31.1
- [PULL 00/16] Trivial branch for 6.1 patches, Laurent Vivier, 2021/05/15
- [PULL 06/16] qapi: spelling fix (addtional), Laurent Vivier, 2021/05/15
- [PULL 02/16] hw/virtio: Pass virtio_feature_get_config_size() a const argument, Laurent Vivier, 2021/05/15
- [PULL 01/16] backends/tpm: Replace qemu_mutex_lock calls with QEMU_LOCK_GUARD, Laurent Vivier, 2021/05/15
- [PULL 03/16] virtio-blk: Constify VirtIOFeature feature_sizes[], Laurent Vivier, 2021/05/15
- [PULL 04/16] virtio-net: Constify VirtIOFeature feature_sizes[], Laurent Vivier, 2021/05/15
- [PULL 05/16] virtiofsd: Fix check of chown()'s return value, Laurent Vivier, 2021/05/15
- [PULL 10/16] cutils: fix memory leak in get_relocated_path(), Laurent Vivier, 2021/05/15
- [PULL 07/16] hw/gpio/aspeed: spelling fix (addtional), Laurent Vivier, 2021/05/15
- [PULL 11/16] hw/mem/meson: Fix linking sparse-mem device with fuzzer,
Laurent Vivier <=
- [PULL 14/16] target/sh4: Return error if CPUClass::get_phys_page_debug() fails, Laurent Vivier, 2021/05/15
- [PULL 16/16] target/avr: Ignore unimplemented WDR opcode, Laurent Vivier, 2021/05/15
- [PULL 08/16] hw/timer/etraxfs_timer: Convert to 3-phase reset (Resettable interface), Laurent Vivier, 2021/05/15
- [PULL 09/16] hw/rtc/mc146818rtc: Convert to 3-phase reset (Resettable interface), Laurent Vivier, 2021/05/15
- [PULL 13/16] multi-process: Avoid logical AND of mutually exclusive tests, Laurent Vivier, 2021/05/15
- [PULL 12/16] hw/pci-host: Do not build gpex-acpi.c if GPEX is not selected, Laurent Vivier, 2021/05/15
- [PULL 15/16] hw/avr/atmega.c: use the avr51 cpu for atmega1280, Laurent Vivier, 2021/05/15
- Re: [PULL 00/16] Trivial branch for 6.1 patches, Peter Maydell, 2021/05/17