From patchwork Thu Feb 20 15:10:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 25056 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f72.google.com (mail-oa0-f72.google.com [209.85.219.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B2091203BE for ; Thu, 20 Feb 2014 15:10:24 +0000 (UTC) Received: by mail-oa0-f72.google.com with SMTP id i4sf6521961oah.11 for ; Thu, 20 Feb 2014 07:10:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=c/fC1NfbIqdy2XbT2WCxWtNxxB9STORSXExe5Za5WZI=; b=hhT0eGetmicq7nzTYlCDaRkBiiuOLMc3UWdXArKzkFJ/3zw9q8NvLpEaXuzNxqxahs 0I5ai+JSgZLJVx5XvA0m8xRm0KHeS9/gd+WQoG8aSiv2+EpwMiC3dhdCp4fLgJBv26S/ BgqUBskiYy/yU8pfL7KDyHHt81nTrhfHAZHgCKcmDHKmS4CzBWJbMou4znbxPxTqFcma mI2bOIPGJK6HS58J9iqrIbsTmNpWXu0iiPo5ut9bOwAq/6aWXhhRiWEcGVbTDDcUcHJO 8p8VzfE7TnsTrbs0aNSdkthFiSGl/unJnuY0Yc9Pxh+QFnMSIVbHyqBAhexhA4jg+UgB qjiw== X-Gm-Message-State: ALoCoQnJuwDy53fMzc1lr1PzfU6x1ibn+tCL9m1A+lxLFkFbCmmC9bYt2iKO4XWzRitHK2sWHE2P X-Received: by 10.182.129.129 with SMTP id nw1mr947331obb.34.1392909023915; Thu, 20 Feb 2014 07:10:23 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.92.65 with SMTP id a59ls549393qge.72.gmail; Thu, 20 Feb 2014 07:10:23 -0800 (PST) X-Received: by 10.52.34.173 with SMTP id a13mr1085227vdj.68.1392909023756; Thu, 20 Feb 2014 07:10:23 -0800 (PST) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id eb8si1564860vdb.21.2014.02.20.07.10.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Feb 2014 07:10:23 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id lf12so1995330vcb.3 for ; Thu, 20 Feb 2014 07:10:23 -0800 (PST) X-Received: by 10.52.164.39 with SMTP id yn7mr1058951vdb.25.1392909023658; Thu, 20 Feb 2014 07:10:23 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp65691vcz; Thu, 20 Feb 2014 07:10:23 -0800 (PST) X-Received: by 10.194.110.41 with SMTP id hx9mr2658349wjb.28.1392909022239; Thu, 20 Feb 2014 07:10:22 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id nd19si5571828wic.31.2014.02.20.07.10.21 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 20 Feb 2014 07:10:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::1 as permitted sender) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1WGVGS-0003ej-Nw; Thu, 20 Feb 2014 15:10:16 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Alexey Kardashevskiy , Thomas Huth Subject: [PATCH] configure: check that C++ compiler actually works Date: Thu, 20 Feb 2014 15:10:16 +0000 Message-Id: <1392909016-14028-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Check that the C++ compiler works with the C compiler; if it does not, then don't pass CXX to the build process. This fixes a regression where QEMU was no longer building if the build environment didn't have a C++ compiler (introduced in commit 3144f78b, which incorrectly assumed that rules.mak would only see a non-empty $(CXX) if configure had actually found a working C++ compiler). Signed-off-by: Peter Maydell Reported-by: Alexey Kardashevskiy Reported-by: Thomas Huth --- Apologies for the breakage for people who were building in setups with no C++ compiler -- I should have tested the original change more thoroughly. configure | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/configure b/configure index 4648117..6829cbb 100755 --- a/configure +++ b/configure @@ -1289,6 +1289,35 @@ else error_exit "\"$cc\" either does not exist or does not work" fi +# Check that the C++ compiler exists and works with the C compiler +if has $cxx; then + cat > $TMPC < $TMPC <