From patchwork Mon Aug 3 12:46:11 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 30521 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 86518B7079 for ; Mon, 3 Aug 2009 23:25:50 +1000 (EST) Received: from localhost ([127.0.0.1]:54500 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MXxXs-0000dB-At for incoming@patchwork.ozlabs.org; Mon, 03 Aug 2009 09:25:44 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MXwz0-0003Dz-Nn for qemu-devel@nongnu.org; Mon, 03 Aug 2009 08:49:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MXwyv-00039s-00 for qemu-devel@nongnu.org; Mon, 03 Aug 2009 08:49:41 -0400 Received: from [199.232.76.173] (port=51668 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MXwyu-00039l-QT for qemu-devel@nongnu.org; Mon, 03 Aug 2009 08:49:36 -0400 Received: from mx2.redhat.com ([66.187.237.31]:40781) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MXwyu-0006wA-6B for qemu-devel@nongnu.org; Mon, 03 Aug 2009 08:49:36 -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 n73CnZeI006463; Mon, 3 Aug 2009 08:49:35 -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 n73CnYEg026033; Mon, 3 Aug 2009 08:49:34 -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 n73Cn8MO009715; Mon, 3 Aug 2009 08:49:33 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Mon, 3 Aug 2009 14:46:11 +0200 Message-Id: <5afa9f722a910aa38d946cf75d01938f7669c41c.1249301360.git.quintela@redhat.com> 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 20/81] refactor sparc_cpu code to be in a single place 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 | 45 +++++++++++++++++++++------------------------ 1 files changed, 21 insertions(+), 24 deletions(-) diff --git a/configure b/configure index 0f1299b..b2bd378 100755 --- a/configure +++ b/configure @@ -32,6 +32,7 @@ cpu="" prefix="" interp_prefix="/usr/gnemul/qemu-%M" static="no" +sparc_cpu="" cross_prefix="" cc="gcc" audio_drv_list="" @@ -61,19 +62,10 @@ for opt do --sparc_cpu=*) sparc_cpu="$optarg" case $sparc_cpu in - v7|v8) - CFLAGS="-m32 -mcpu=${sparc_cpu} -D__sparc_${sparc_cpu}__ $CFLAGS" - LDFLAGS="-m32 $LDFLAGS" - cpu="sparc" - ;; - v8plus|v8plusa) - CFLAGS="-m32 -mcpu=ultrasparc -D__sparc_${sparc_cpu}__ $CFLAGS" - LDFLAGS="-m32 $LDFLAGS" + v7|v8|v8plus|v8plusa) cpu="sparc" ;; v9) - CFLAGS="-m64 -mcpu=ultrasparc -D__sparc_${sparc_cpu}__ $CFLAGS" - LDFLAGS="-m64 $LDFLAGS" cpu="sparc64" ;; *) @@ -551,23 +543,28 @@ done # host_guest_base="no" case "$cpu" in - sparc) if test -z "$sparc_cpu" ; then - CFLAGS="-m32 -mcpu=ultrasparc -D__sparc_v8plus__ $CFLAGS" - LDFLAGS="-m32 $LDFLAGS" - fi - CFLAGS="-ffixed-g2 -ffixed-g3 $CFLAGS" + sparc) case $sparc_cpu in + v7|v8) + CFLAGS="-mcpu=${sparc_cpu} -D__sparc_${sparc_cpu}__ $CFLAGS" + ;; + v8plus|v8plusa) + CFLAGS="-mcpu=ultrasparc -D__sparc_${sparc_cpu}__ $CFLAGS" + ;; + *) # sparc_cpu not defined in the command line + CFLAGS="-mcpu=ultrasparc -D__sparc_v8plus__ $CFLAGS" + esac + LDFLAGS="-m32 $LDFLAGS" + CFLAGS="-m32 -ffixed-g2 -ffixed-g3 $CFLAGS" if test "$solaris" = "no" ; then - CFLAGS="-ffixed-g1 -ffixed-g6 $CFLAGS" + CFLAGS="-ffixed-g1 -ffixed-g6 $CFLAGS" fi ;; - sparc64) if test -z "$sparc_cpu" ; then - CFLAGS="-m64 -mcpu=ultrasparc -D__sparc_v9__ $CFLAGS" - LDFLAGS="-m64 $LDFLAGS" - fi - if test "$solaris" = "no" ; then - CFLAGS="-ffixed-g5 -ffixed-g6 -ffixed-g7 $CFLAGS" - else - CFLAGS="-ffixed-g1 -ffixed-g5 -ffixed-g6 -ffixed-g7 $CFLAGS" + sparc64) + CFLAGS="-m64 -mcpu=ultrasparc -D__sparc_v9__ $CFLAGS" + LDFLAGS="-m64 $LDFLAGS" + CFLAGS="-ffixed-g5 -ffixed-g6 -ffixed-g7 $CFLAGS" + if test "$solaris" != "no" ; then + CFLAGS="-ffixed-g1 $CFLAGS" fi ;; s390)