From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=40817 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P5eTr-0007Ui-Vr for qemu-devel@nongnu.org; Tue, 12 Oct 2010 09:01:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P5eTl-0004Vi-Cn for qemu-devel@nongnu.org; Tue, 12 Oct 2010 09:01:23 -0400 Received: from mail-qw0-f45.google.com ([209.85.216.45]:52643) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P5eTl-0004Mc-9o for qemu-devel@nongnu.org; Tue, 12 Oct 2010 09:01:17 -0400 Received: by mail-qw0-f45.google.com with SMTP id 5so1841033qwh.4 for ; Tue, 12 Oct 2010 06:01:16 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 12 Oct 2010 15:00:23 +0200 Message-Id: <1286888457-5033-6-git-send-email-pbonzini@redhat.com> In-Reply-To: <1286888457-5033-1-git-send-email-pbonzini@redhat.com> References: <1286888457-5033-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 05/39] 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 6b5c323..8cd034a 100755 --- a/configure +++ b/configure @@ -217,31 +217,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="$flag $QEMU_CFLAGS" - 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="$flag $QEMU_CFLAGS" + fi +done + # # Solaris specific configure tool chain decisions # -- 1.7.2.3