From nobody Fri Apr 26 10:05:25 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1617716391; cv=none; d=zohomail.com; s=zohoarc; b=k6A0c8NEBC1++7NH/yQBNLsMKb1W0OVDBeg72QTylwXoZWlKvJMlAt/iP6lvHlwh5+tTWQWxkuY9t7yya8LUNbmJMxgYIbPH3vEhVJsymX2VTfqCwbOUKOTpW5zwWYi3AfvSYQOYGN3TQiJeQ5VXCArV94ZA+R2bWj7vo4SwR9g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1617716391; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=PIo2bUtEV+ltcwMSsfh85ITODKunH+9eCcWMQh7XGFg=; b=bPdzSON+u0T9Im/F7oT0dyrqIxRDCsoXrxHbZwDbWOtALVeXPyX4TcsVjU6ghoQN4fJhmJucyHQTZTFj/qGOdP4BnPuX/5GIyQ+brjBM++4gn4IYZAwNhPzhuslmiuJI+9n6rf7MOR4rbhCC2pI5JALbsr+3q7DicodW8zMahVs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1617716391450575.041845050646; Tue, 6 Apr 2021 06:39:51 -0700 (PDT) Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-453-17cFY-qANfC9mue67FmgKA-1; Tue, 06 Apr 2021 09:39:48 -0400 Received: by mail-ej1-f70.google.com with SMTP id zn19so1577801ejb.14 for ; Tue, 06 Apr 2021 06:39:48 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.redhat.com (17.red-88-21-201.staticip.rima-tde.net. [88.21.201.17]) by smtp.gmail.com with ESMTPSA id jt18sm4883029ejc.96.2021.04.06.06.39.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Apr 2021 06:39:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1617716390; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PIo2bUtEV+ltcwMSsfh85ITODKunH+9eCcWMQh7XGFg=; b=EJmYlm0m/ucFEcxMhb591ZhkVfmTAyNFWwpJVQJNtdpvl5KN6daXqZQEQ1/CG11wVv1ffd ibDUgC7UQG1ccp/rBvffQ8Zg85SmE45CmO855dM1YeXCaMOduZgoyfsdjvOm9wOAs1w22v W2L0ysg+arMRYqSFaFDTb4nXMaFRuIU= X-MC-Unique: 17cFY-qANfC9mue67FmgKA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=PIo2bUtEV+ltcwMSsfh85ITODKunH+9eCcWMQh7XGFg=; b=qESSP4PQ9potRfhaBvPJwHYSr8biyP61/qdFkrZvDIFQqZE1yPRVlZ421JOxd5cSM0 nupEn+sgNei1JiuW3vUWFBn9H1Ds1kFaUNE8YnnOD/tJefwyNc8nPFwz7/UKS5VRttLd vBf/Go7XdTmBfOOSUzNUeSZa+nyrA1EQywrg5zzcLo0TfCP+wsyrkQ4IOQ7V0LqpZv2b +og831vLly/MVKPzVxnp4kC3JEBQH6RTT3Bu9xOnOnNElWboZWjyrqEX2NlmKWy4FpAW QG9PiWLD73klVFIbQN+t2W94fos2lt5CKfoghW08UIoqhdw0okU2HmkyIyzFpEl17kWa BiMA== X-Gm-Message-State: AOAM5315ni2hdSLOPXOMgwR8jTzkNJ6WwPYqXulWMp0QsUHuahMB/rZQ iIw/oPnTCMhZCd4O9cRg0bQ5JGzHyBrfQdbsVTdo2U4l6cMCvLzH8cLGYVDcEX8Qig2wxKOid3e 24H5e6GW7UwtjZQ== X-Received: by 2002:a17:906:813:: with SMTP id e19mr7653600ejd.359.1617716387059; Tue, 06 Apr 2021 06:39:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlkugmCZ0VE57OMRrehrcS/E6dae4qJaTK5g2g9DfSSI4E592kgrVfaAt4/eu95N1KaDETXw== X-Received: by 2002:a17:906:813:: with SMTP id e19mr7653579ejd.359.1617716386896; Tue, 06 Apr 2021 06:39:46 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Darren Kenny , Paolo Bonzini , Igor Mammedov , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH-for-6.0] hw/mem/meson: Fix linking sparse-mem device with fuzzer Date: Tue, 6 Apr 2021 15:39:44 +0200 Message-Id: <20210406133944.4193691-1-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @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_i= nit' clang-10: error: linker command failed with exit code 1 (use -v to see in= vocation) 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=C3=A9 Reviewed-by: Alexander Bulekov --- 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 =3D 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')) =20 softmmu_ss.add_all(when: 'CONFIG_MEM_DEVICE', if_true: mem_ss) + +softmmu_ss.add(when: 'CONFIG_FUZZ', if_true: files('sparse-mem.c')) --=20 2.26.3