Received: from [140.186.70.92] (port=48392 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PVieS-00077u-21 for qemu-devel@nongnu.org; Thu, 23 Dec 2010 05:44:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PVieQ-0003li-E7 for qemu-devel@nongnu.org; Thu, 23 Dec 2010 05:44:03 -0500 Received: from mail-wy0-f173.google.com ([74.125.82.173]:36916) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PVieQ-0003e9-6h for qemu-devel@nongnu.org; Thu, 23 Dec 2010 05:44:02 -0500 Received: by mail-wy0-f173.google.com with SMTP id 36so6457648wyg.4 for ; Thu, 23 Dec 2010 02:44:01 -0800 (PST) Sender: Paolo Bonzini From: Paolo Bonzini Date: Thu, 23 Dec 2010 11:43:52 +0100 Message-Id: <1293101042-13121-6-git-send-email-pbonzini@redhat.com> In-Reply-To: <1293101042-13121-1-git-send-email-pbonzini@redhat.com> References: <1293101042-13121-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH v3 05/15] test cc with the complete set of chosen flags List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@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 d9277fe..93b5765 100755 --- a/configure +++ b/configure @@ -220,31 +220,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 # -- 1.7.3.2