From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35269) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEeqK-0003sj-FU for qemu-devel@nongnu.org; Mon, 02 Apr 2012 06:50:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SEeqB-0003im-N4 for qemu-devel@nongnu.org; Mon, 02 Apr 2012 06:50:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21651) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEeqB-0003iO-Fd for qemu-devel@nongnu.org; Mon, 02 Apr 2012 06:50:27 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q32AoPBr003894 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 2 Apr 2012 06:50:26 -0400 From: "Daniel P. Berrange" Date: Mon, 2 Apr 2012 11:50:09 +0100 Message-Id: <1333363816-1691-3-git-send-email-berrange@redhat.com> In-Reply-To: <1333363816-1691-1-git-send-email-berrange@redhat.com> References: <1333363816-1691-1-git-send-email-berrange@redhat.com> Subject: [Qemu-devel] [PATCH 2/9] Fix checking for compiler flag support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org From: "Daniel P. Berrange" Some warning flags have dependancies, eg -Wformat-security cannot be enabled if -Wformat is not already enabled. The compiler flag checking code was checking each flag in isolation so several were not getting enabled. The fix is to supply all previously confirmed flags when checking a flag Signed-off-by: Daniel P. Berrange --- configure | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/configure b/configure index cd40d17..64ab4dc 100755 --- a/configure +++ b/configure @@ -1168,11 +1168,13 @@ gcc_flags="$gcc_flags -Wendif-labels" cat > $TMPC << EOF int main(void) { return 0; } EOF +warning_flags= for flag in $gcc_flags; do - if compile_prog "-Werror $flag" "" ; then - QEMU_CFLAGS="$QEMU_CFLAGS $flag" + if compile_prog "-Werror $warning_flags $flag" "" ; then + warning_flags="$warning_flags $flag" fi done +QEMU_CFLAGS="$QEMU_CFLAGS $warning_flags" if test "$static" = "yes" ; then if test "$pie" = "yes" ; then -- 1.7.7.6