From nobody Sun May 19 00:42:55 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1621424413; cv=none; d=zohomail.com; s=zohoarc; b=BvBZlPbhDFt1IslLzBkqd9fRDocg415n9SQtMzyqL3ma0u0bud5NKt37IuPEGHFy2Odmede8CUart2HuvHidSR7PmcxKb2+LV0IvDtyvzOjeVu6IE8X0JRQHH/2/SfybBogPeOiJROt/6BLgo+MJaHyXbu2WQv8IRjA808XPRuI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621424413; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=4tHC9cW4sOIgmwu3FfEV145O9OPG3CwI6wjHrKIzqtw=; b=hgJ1M5V8jr9z2mTEBJptq6id6cEksPCAg04vLk8EikEonGoVVj/7p9LX1RUpCm9sYm+QRrhPDcZuSRYeHhLQYoRCSNoCTwXofMkvu2zp3Tz0WtXCNX3+DUdV9HEDhbWkhfY1b3VkRJnpPhGEUE3dCWLG8/nUhpVbjRNEgMjsLPM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1621424413482576.0469761118613; Wed, 19 May 2021 04:40:13 -0700 (PDT) Received: from localhost ([::1]:41248 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ljKYe-0001Qa-Ba for importer@patchew.org; Wed, 19 May 2021 07:40:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43240) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljKXJ-0000UK-Ir for qemu-devel@nongnu.org; Wed, 19 May 2021 07:38:49 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:60221) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ljKXH-0007JY-Fg for qemu-devel@nongnu.org; Wed, 19 May 2021 07:38:49 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-586-yLF4v8lxNCmaLjN6l4GGbw-1; Wed, 19 May 2021 07:38:44 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E84188015C6; Wed, 19 May 2021 11:38:43 +0000 (UTC) Received: from thuth.com (ovpn-112-85.ams2.redhat.com [10.36.112.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id EA20670137; Wed, 19 May 2021 11:38:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621424326; 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=4tHC9cW4sOIgmwu3FfEV145O9OPG3CwI6wjHrKIzqtw=; b=XgDJZA+ZCWbsNFVoWZb9i08VemZ9631E72UBxR31Ohhmh3a71A+ilyRlxGwPuWVVjU/uMa ObrjJZUevcH6Fv2qZXZmSyJb+jYrdJW4I6AOdDm6I11+AahyT+kOIcP/me7dlMmudAlM6J nNEUkgT0J5Oocn0YgJzgq1nBe3TKgzI= X-MC-Unique: yLF4v8lxNCmaLjN6l4GGbw-1 From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PATCH v2] configure: Avoid error messages about missing *-config-*.h files Date: Wed, 19 May 2021 13:38:40 +0200 Message-Id: <20210519113840.298174-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.39, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) 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=C3=A9 Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- v2: Use ":>" instead of "touch" as suggested by Philippe configure | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 963e35b9a7..bf1c740494 100755 --- a/configure +++ b/configure @@ -6458,10 +6458,14 @@ fi =20 # 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=3D$(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 =20 # Save the configure command line for later reuse. cat <config.status --=20 2.27.0