From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35234) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEeqH-0003sF-SE for qemu-devel@nongnu.org; Mon, 02 Apr 2012 06:50:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SEeqB-0003ie-Dw for qemu-devel@nongnu.org; Mon, 02 Apr 2012 06:50:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2866) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEeqB-0003iJ-4y 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 q32AoPjL020639 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 2 Apr 2012 06:50:25 -0400 From: "Daniel P. Berrange" Date: Mon, 2 Apr 2012 11:50:08 +0100 Message-Id: <1333363816-1691-2-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 1/9] Move all compiler warning/optimization flags to the same place List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org From: "Daniel P. Berrange" The list of warning/optimization flags set in QEMU_CFLAGS is in two places in configure. Only one of the places checks for GCC support. Merge the two separate lists into one and ensure they are all tested. Set one flag per line to make it easier to read the list of flags as increasing numbers are enabled Signed-off-by: Daniel P. Berrange --- configure | 31 ++++++++++++++++++++++++------- 1 files changed, 24 insertions(+), 7 deletions(-) diff --git a/configure b/configure index 4b3adc9..cd40d17 100755 --- a/configure +++ b/configure @@ -252,9 +252,6 @@ pkg_config=query_pkg_config sdl_config="${SDL_CONFIG-${cross_prefix}sdl-config}" # default flags for all hosts -QEMU_CFLAGS="-fno-strict-aliasing $QEMU_CFLAGS" -QEMU_CFLAGS="-Wall -Wundef -Wwrite-strings -Wmissing-prototypes $QEMU_CFLAGS" -QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS" QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $QEMU_CFLAGS" QEMU_CFLAGS="-D_FORTIFY_SOURCE=2 $QEMU_CFLAGS" QEMU_INCLUDES="-I. -I\$(SRC_PATH) -I\$(SRC_PATH)/fpu" @@ -1144,10 +1141,30 @@ else exit 1 fi -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 -Wendif-labels $gcc_flags" +gcc_flags= + +# Optimization flags +gcc_flags="$gcc_flags -fstack-protector-all" +gcc_flags="$gcc_flags -fno-strict-aliasing" + +# Warning flags +gcc_flags="$gcc_flags -Wall" +gcc_flags="$gcc_flags -Wundef" +gcc_flags="$gcc_flags -Wwrite-strings" +gcc_flags="$gcc_flags -Wmissing-prototypes" +gcc_flags="$gcc_flags -Wstrict-prototypes" +gcc_flags="$gcc_flags -Wredundant-decls" +gcc_flags="$gcc_flags -Wold-style-declaration" +gcc_flags="$gcc_flags -Wold-style-definition" +gcc_flags="$gcc_flags -Wtype-limits" +gcc_flags="$gcc_flags -Wformat-security" +gcc_flags="$gcc_flags -Wformat-y2k" +gcc_flags="$gcc_flags -Winit-self" +gcc_flags="$gcc_flags -Wignored-qualifiers" +gcc_flags="$gcc_flags -Wmissing-include-dirs" +gcc_flags="$gcc_flags -Wempty-body" +gcc_flags="$gcc_flags -Wnested-externs" +gcc_flags="$gcc_flags -Wendif-labels" cat > $TMPC << EOF int main(void) { return 0; } EOF -- 1.7.7.6