[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 26/28] configure: Avoid error messages about missing *-config-*.h
From: |
Paolo Bonzini |
Subject: |
[PULL 26/28] configure: Avoid error messages about missing *-config-*.h files |
Date: |
Mon, 24 May 2021 18:41:29 +0200 |
From: Thomas Huth <thuth@redhat.com>
When compiling with --disable-system there is a harmless yet still
annoying error message at the end of the "configure" step:
sed: can't read *-config-devices.h: No such file or directory
When only building the tools or docs, without any emulator at all,
there is even an additional message about missing *-config-target.h
files.
Fix it by checking whether any of these files are available before
using them.
Fixes: e0447a834d ("configure: Poison all current target-specific #defines")
Reported-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210519113840.298174-1-thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/configure b/configure
index cca532bb0c..90c0807347 100755
--- a/configure
+++ b/configure
@@ -6503,10 +6503,14 @@ fi
# Create list of config switches that should be poisoned in common code...
# but filter out CONFIG_TCG and CONFIG_USER_ONLY which are special.
-sed -n -e '/CONFIG_TCG/d' -e '/CONFIG_USER_ONLY/d' \
- -e '/^#define / { s///; s/ .*//; s/^/#pragma GCC poison /p; }' \
- *-config-devices.h *-config-target.h | \
- sort -u > config-poison.h
+target_configs_h=$(ls *-config-devices.h *-config-target.h 2>/dev/null)
+if test -n "$target_configs_h" ; then
+ sed -n -e '/CONFIG_TCG/d' -e '/CONFIG_USER_ONLY/d' \
+ -e '/^#define / { s///; s/ .*//; s/^/#pragma GCC poison /p; }' \
+ $target_configs_h | sort -u > config-poison.h
+else
+ :> config-poison.h
+fi
# Save the configure command line for later reuse.
cat <<EOD >config.status
--
2.31.1
- [PULL 02/28] configure: check for submodules if --with-git-submodules=ignore, (continued)
- [PULL 02/28] configure: check for submodules if --with-git-submodules=ignore, Paolo Bonzini, 2021/05/24
- [PULL 09/28] memory: Introduce log_sync_global() to memory listener, Paolo Bonzini, 2021/05/24
- [PULL 01/28] configure: Only clone softfloat-3 repositories if TCG is enabled, Paolo Bonzini, 2021/05/24
- [PULL 22/28] replication: move include out of root directory, Paolo Bonzini, 2021/05/24
- [PULL 19/28] tests/qtest/fuzz: Fix build failure, Paolo Bonzini, 2021/05/24
- [PULL 18/28] KVM: Dirty ring support, Paolo Bonzini, 2021/05/24
- [PULL 20/28] meson: Set implicit_include_directories to false, Paolo Bonzini, 2021/05/24
- [PULL 25/28] doc: Add notes about -mon option mode=control argument., Paolo Bonzini, 2021/05/24
- [PULL 07/28] qtest: add a QOM object for qtest, Paolo Bonzini, 2021/05/24
- [PULL 27/28] hw/scsi: Fix sector translation bug in scsi_unmap_complete_noio, Paolo Bonzini, 2021/05/24
- [PULL 26/28] configure: Avoid error messages about missing *-config-*.h files,
Paolo Bonzini <=
- [PULL 28/28] gitlab-ci: use --meson=git for CFI jobs, Paolo Bonzini, 2021/05/24
- [PULL 17/28] KVM: Disable manual dirty log when dirty ring enabled, Paolo Bonzini, 2021/05/24
- [PULL 05/28] i386/cpu: Expose AVX_VNNI instruction to guest, Paolo Bonzini, 2021/05/24
- [PULL 14/28] KVM: Simplify dirty log sync in kvm_set_phys_mem, Paolo Bonzini, 2021/05/24
- [PULL 15/28] KVM: Cache kvm slot dirty bitmap size, Paolo Bonzini, 2021/05/24
- [PULL 24/28] qemu-config: load modules when instantiating option groups, Paolo Bonzini, 2021/05/24
- [PULL 16/28] KVM: Add dirty-ring-size property, Paolo Bonzini, 2021/05/24
- [PULL 23/28] vl: allow not specifying size in -m when using -M memory-backend, Paolo Bonzini, 2021/05/24
- [PULL 12/28] KVM: Provide helper to get kvm dirty log, Paolo Bonzini, 2021/05/24
- Re: [PULL 00/28] Misc patches for 2021-05-24, no-reply, 2021/05/24