From patchwork Wed Nov 1 19:31:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Henrique Barboza X-Patchwork-Id: 833099 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yRyyw4FL7z9t2V for ; Thu, 2 Nov 2017 06:32:08 +1100 (AEDT) Received: from localhost ([::1]:57446 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9ykA-0004LA-5G for incoming@patchwork.ozlabs.org; Wed, 01 Nov 2017 15:32:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33469) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9yjo-0004L4-Eh for qemu-devel@nongnu.org; Wed, 01 Nov 2017 15:31:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e9yjk-0001UH-AS for qemu-devel@nongnu.org; Wed, 01 Nov 2017 15:31:44 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:44312 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e9yjk-0001TS-5Q for qemu-devel@nongnu.org; Wed, 01 Nov 2017 15:31:40 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vA1JTW7U121563 for ; Wed, 1 Nov 2017 15:31:36 -0400 Received: from e14.ny.us.ibm.com (e14.ny.us.ibm.com [129.33.205.204]) by mx0a-001b2d01.pphosted.com with ESMTP id 2dyj5dydgd-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 01 Nov 2017 15:31:35 -0400 Received: from localhost by e14.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 1 Nov 2017 15:31:35 -0400 Received: from b01cxnp22036.gho.pok.ibm.com (9.57.198.26) by e14.ny.us.ibm.com (146.89.104.201) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 1 Nov 2017 15:31:32 -0400 Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vA1JVWdN49348816; Wed, 1 Nov 2017 19:31:32 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5B877112040; Wed, 1 Nov 2017 15:31:00 -0400 (EDT) Received: from localhost.localdomain (unknown [9.80.223.159]) by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTP id 6B075112056; Wed, 1 Nov 2017 15:30:59 -0400 (EDT) From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Date: Wed, 1 Nov 2017 17:31:26 -0200 X-Mailer: git-send-email 2.13.6 X-TM-AS-GCONF: 00 x-cbid: 17110119-0052-0000-0000-0000027B2D24 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007993; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000239; SDB=6.00939719; UDB=6.00473799; IPR=6.00719980; BA=6.00005666; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017824; XFM=3.00000015; UTC=2017-11-01 19:31:33 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17110119-0053-0000-0000-0000527FA370 Message-Id: <20171101193126.19730-1-danielhb@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-11-01_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1711010253 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.158.5 Subject: [Qemu-devel] [PATCH v4] configure: do CC check before verifying host CPU 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: peter.maydell@linaro.org, mdroth@linux.vnet.ibm.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" When executing 'configure' in a fresh QEMU clone, in a fresh OS install running in a ppc64le host, this is the error shown: ----- ../configure --enable-trace-backend=simple --enable-debug --target-list=ppc64-softmmu ERROR: Unsupported CPU = ppc64le, try --enable-tcg-interpreter ----- This isn't true, ppc64le host CPU is supported. This happens because, in a fresh install, we don't have a C compiler to autodetect the $cpu variable to "ppc64". Since we need a C compiler to properly get the value of $cpu in this and other cases, this patch changes the location of the C compiler check right after setting the preferred CC. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Philippe Mathieu-Daudé --- configure | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/configure b/configure index 285d123dbf..a641bf18b6 100755 --- a/configure +++ b/configure @@ -467,6 +467,23 @@ else cc="${CC-${cross_prefix}gcc}" fi +write_c_skeleton() { + cat > $TMPC < $TMPC <