From mboxrd@z Thu Jan 1 00:00:00 1970 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) Sender: Paolo Bonzini From: Paolo Bonzini Date: Sun, 14 Nov 2010 12:48:53 +0100 Message-Id: <1289735342-8660-6-git-send-email-pbonzini@redhat.com> In-Reply-To: <1289735342-8660-1-git-send-email-pbonzini@redhat.com> References: <1289735342-8660-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 05/14] 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 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 # -- 1.7.2.3