From patchwork Mon Aug 3 12:45:59 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 30510 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id B670AB6F34 for ; Mon, 3 Aug 2009 23:05:57 +1000 (EST) Received: from localhost ([127.0.0.1]:57822 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MXxEb-0008OD-0n for incoming@patchwork.ozlabs.org; Mon, 03 Aug 2009 09:05:49 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MXwyq-000377-Jp for qemu-devel@nongnu.org; Mon, 03 Aug 2009 08:49:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MXwyi-00032X-RV for qemu-devel@nongnu.org; Mon, 03 Aug 2009 08:49:30 -0400 Received: from [199.232.76.173] (port=51647 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MXwyh-00031g-W4 for qemu-devel@nongnu.org; Mon, 03 Aug 2009 08:49:24 -0400 Received: from mx2.redhat.com ([66.187.237.31]:40754) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MXwyg-0006qw-6M for qemu-devel@nongnu.org; Mon, 03 Aug 2009 08:49:22 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n73CnLnl006371; Mon, 3 Aug 2009 08:49:21 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n73CnKuZ025949; Mon, 3 Aug 2009 08:49:20 -0400 Received: from localhost.localdomain (vpn-12-117.rdu.redhat.com [10.11.12.117]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n73Cn8MC009715; Mon, 3 Aug 2009 08:49:18 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Mon, 3 Aug 2009 14:45:59 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: aliguori@us.ibm.com Subject: [Qemu-devel] [PATCH 08/81] move general CFLAGS/LDFLAGS definitions after last $cc run X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Juan Quintela --- configure | 63 +++++++++++++++++++++++++++++++----------------------------- 1 files changed, 33 insertions(+), 30 deletions(-) diff --git a/configure b/configure index 3b46695..7b0ff90 100755 --- a/configure +++ b/configure @@ -530,36 +530,6 @@ for opt do esac done -# default flags for all hosts -CFLAGS="$CFLAGS -g -fno-strict-aliasing" -if test "$debug" = "no" ; then - CFLAGS="$CFLAGS -O2" -fi -CFLAGS="$CFLAGS -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls" -LDFLAGS="$LDFLAGS -g" - -# Consult white-list to determine whether to enable werror -# by default. Only enable by default for git builds -if test -z "$werror" ; then - z_version=`cut -f3 -d. $source_path/VERSION` - if test "$z_version" = "50" -a \ - "$linux" = "yes" ; then - werror="yes" - else - werror="no" - fi -fi - -if test "$werror" = "yes" ; then - CFLAGS="$CFLAGS -Werror" -fi - -if test "$solaris" = "no" ; then - if ld --version 2>/dev/null | grep "GNU ld" >/dev/null 2>/dev/null ; then - LDFLAGS="$LDFLAGS -Wl,--warn-common" - fi -fi - # # If cpu ~= sparc and sparc_cpu hasn't been defined, plug in the right # ARCH_CFLAGS/ARCH_LDFLAGS (assume sparc_v8plus for 32-bit and sparc_v9 for 64-bit) @@ -1441,6 +1411,39 @@ else exit 1 fi +# End of CC checks +# After here, no more $cc or $ld runs + +# default flags for all hosts +CFLAGS="$CFLAGS -g -fno-strict-aliasing" +if test "$debug" = "no" ; then + CFLAGS="$CFLAGS -O2" +fi +CFLAGS="$CFLAGS -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls" +LDFLAGS="$LDFLAGS -g" + +# Consult white-list to determine whether to enable werror +# by default. Only enable by default for git builds +if test -z "$werror" ; then + z_version=`cut -f3 -d. $source_path/VERSION` + if test "$z_version" = "50" -a \ + "$linux" = "yes" ; then + werror="yes" + else + werror="no" + fi +fi + +if test "$werror" = "yes" ; then + CFLAGS="$CFLAGS -Werror" +fi + +if test "$solaris" = "no" ; then + if $ld --version 2>/dev/null | grep "GNU ld" >/dev/null 2>/dev/null ; then + LDFLAGS="$LDFLAGS -Wl,--warn-common" + fi +fi + if test "$mingw32" = "yes" ; then if test -z "$prefix" ; then prefix="c:\\\\Program Files\\\\Qemu"