From nobody Sun May 19 00:17:09 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1498490821276647.5569854927384; Mon, 26 Jun 2017 08:27:01 -0700 (PDT) Received: from localhost ([::1]:47188 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dPVul-0003m2-Sh for importer@patchew.org; Mon, 26 Jun 2017 11:26:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59928) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dPVtJ-0002vt-Lo for qemu-devel@nongnu.org; Mon, 26 Jun 2017 11:25:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dPVtI-0000fw-RQ for qemu-devel@nongnu.org; Mon, 26 Jun 2017 11:25:29 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:37348) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dPVtI-0000fG-ID for qemu-devel@nongnu.org; Mon, 26 Jun 2017 11:25:28 -0400 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.84_2) (envelope-from ) id 1dPVtF-0007tU-JW; Mon, 26 Jun 2017 16:25:25 +0100 From: Peter Maydell To: qemu-devel@nongnu.org, qemu-trivial@nongnu.org Date: Mon, 26 Jun 2017 16:25:24 +0100 Message-Id: <1498490724-20674-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 2.7.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PATCH] configure: Handle having no c++ compiler in FORTIFY_SOURCE check X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: patches@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Our FORTIFY_SOURCE check assumes that $cxx refers to a working C++ compiler, with the result that if you don't happen to have one then configure will spuriously print configure: line 4685: c++: command not found Fix this by adding a 'has $cxx' check. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index c571ad1..a435908 100755 --- a/configure +++ b/configure @@ -4681,7 +4681,7 @@ fi if test "$fortify_source" !=3D "no"; then if echo | $cc -dM -E - | grep __clang__ > /dev/null 2>&1 ; then fortify_source=3D"no"; - elif test -n "$cxx" && + elif test -n "$cxx" && has $cxx && echo | $cxx -dM -E - | grep __clang__ >/dev/null 2>&1 ; then fortify_source=3D"no"; else --=20 2.7.4