From patchwork Sun Nov 14 11:48:53 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 71104 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 96413B712A for ; Sun, 14 Nov 2010 22:59:17 +1100 (EST) Received: from localhost ([127.0.0.1]:36893 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PHbEo-0007qz-TH for incoming@patchwork.ozlabs.org; Sun, 14 Nov 2010 06:59:14 -0500 Received: from [140.186.70.92] (port=43500 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PHb5N-0002sD-PY for qemu-devel@nongnu.org; Sun, 14 Nov 2010 06:49:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PHb5M-0004GL-RP for qemu-devel@nongnu.org; Sun, 14 Nov 2010 06:49:29 -0500 Received: from mail-pw0-f45.google.com ([209.85.160.45]:61102) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PHb5M-0004GE-Ld for qemu-devel@nongnu.org; Sun, 14 Nov 2010 06:49:28 -0500 Received: by pwj6 with SMTP id 6so977706pwj.4 for ; Sun, 14 Nov 2010 03:49:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:subject:date :message-id:x-mailer:in-reply-to:references; bh=VKc24r7q9sR3qnPk+7e5PIPPpakKCvAmWMtP36wL4J4=; b=i0GnENSwDN7DE136rHTEnBHCGjKkygO7tnPqy5m9g4gt1Vnpt4/9wsxdQod78vfzFa qjupbodMaBvrdI5/nv9UMJGepgosbL3kF0ugoPqUqm3soe/gqcKL0lavA14Yk6p/nUsO AfuB6keZaL/UkBX/TnobO/EU1cIotCGHcbIzM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:subject:date:message-id:x-mailer:in-reply-to :references; b=yFBSA8RbZaWwyYABryHcltOrrIGJNAQSe52oQw0k3mlRQE0c+/+Ucz49Jc2iVatzXz GSspEx/aKWCg+oXmuvCWhhXxG51K4Feu0mgmsiRaRc2kCtjh9kIl8yvpvicivM02HLgI c92fxk+Byh6uvGszxeAaf4hIGt1qoFgPIh10Y= Received: by 10.142.173.2 with SMTP id v2mr3873215wfe.128.1289735367811; Sun, 14 Nov 2010 03:49:27 -0800 (PST) Received: from localhost.localdomain (s209p8.home.99maxprogres.cz [85.93.118.17]) by mx.google.com with ESMTPS id x35sm7086810wfd.13.2010.11.14.03.49.26 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 14 Nov 2010 03:49:27 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Sun, 14 Nov 2010 12:48:53 +0100 Message-Id: <1289735342-8660-6-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.3.2 In-Reply-To: <1289735342-8660-1-git-send-email-pbonzini@redhat.com> References: <1289735342-8660-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: [Qemu-devel] [PATCH 05/14] test cc with the complete set of chosen flags X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The "test the C compiler works ok" comes before a bunch of flags are added for --cpu or just depending on the host. It helps debugging if the test is done after these flags are (unconditionally) added. Signed-off-by: Paolo Bonzini --- configure | 50 +++++++++++++++++++++++++------------------------- 1 files changed, 25 insertions(+), 25 deletions(-) diff --git a/configure b/configure index 47a7525..b11bb44 100755 --- a/configure +++ b/configure @@ -218,31 +218,6 @@ QEMU_CFLAGS="-D_FORTIFY_SOURCE=2 $QEMU_CFLAGS" QEMU_CFLAGS="-I. -I\$(SRC_PATH) $QEMU_CFLAGS" LDFLAGS="-g $LDFLAGS" -gcc_flags="-Wold-style-declaration -Wold-style-definition -Wtype-limits" -gcc_flags="-Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers $gcc_flags" -gcc_flags="-Wmissing-include-dirs -Wempty-body -Wnested-externs $gcc_flags" -gcc_flags="-fstack-protector-all $gcc_flags" -cat > $TMPC << EOF -int main(void) { return 0; } -EOF -for flag in $gcc_flags; do - if compile_prog "-Werror $QEMU_CFLAGS" "-Werror $flag" ; then - QEMU_CFLAGS="$QEMU_CFLAGS $flag" - fi -done - -# check that the C compiler works. -cat > $TMPC < $TMPC < $TMPC < $TMPC << EOF +int main(void) { return 0; } +EOF +for flag in $gcc_flags; do + if compile_prog "-Werror $QEMU_CFLAGS" "-Werror $flag" ; then + QEMU_CFLAGS="$QEMU_CFLAGS $flag" + fi +done + # # Solaris specific configure tool chain decisions #