From patchwork Sun Jan 22 12:27:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 137242 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 58915B6FB6 for ; Mon, 23 Jan 2012 01:50:55 +1100 (EST) Received: from localhost ([::1]:51260 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Roykv-0000d0-C7 for incoming@patchwork.ozlabs.org; Sun, 22 Jan 2012 09:50:53 -0500 Received: from eggs.gnu.org ([140.186.70.92]:48352) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RowWB-0005c4-7p for qemu-devel@nongnu.org; Sun, 22 Jan 2012 07:27:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RowW9-0003bZ-Lg for qemu-devel@nongnu.org; Sun, 22 Jan 2012 07:27:31 -0500 Received: from smtp6-g21.free.fr ([212.27.42.6]:33194) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RowW9-0003b5-2S for qemu-devel@nongnu.org; Sun, 22 Jan 2012 07:27:29 -0500 Received: from Quad (unknown [78.238.229.36]) by smtp6-g21.free.fr (Postfix) with ESMTP id 5C154827E1; Sun, 22 Jan 2012 13:27:23 +0100 (CET) Received: from laurent by Quad with local (Exim 4.76) (envelope-from ) id 1RowW1-00083B-9w; Sun, 22 Jan 2012 13:27:21 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Sun, 22 Jan 2012 13:27:15 +0100 Message-Id: <1327235237-30896-3-git-send-email-laurent@vivier.eu> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1327235237-30896-1-git-send-email-laurent@vivier.eu> References: <1327235237-30896-1-git-send-email-laurent@vivier.eu> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 212.27.42.6 X-Mailman-Approved-At: Sun, 22 Jan 2012 09:50:37 -0500 Cc: Laurent Vivier Subject: [Qemu-devel] [PATCH 2/4] linux-user: specify the cpu model during configure X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Laurent Vivier This patch allows to set the default cpu model for a given architecture, for instance: ./configure --target-list=m68k-linux-user,arm-linux-user \ --m68k-default-cpu=m68040 --arm-default-cpu=sa1100 Signed-off-by: Laurent Vivier --- configure | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/configure b/configure index c251df2..98acce1 100755 --- a/configure +++ b/configure @@ -544,6 +544,10 @@ for opt do ;; --target-list=*) target_list="$optarg" ;; + --*-default-cpu=*) + tmp=`expr "x$opt" : 'x--\(.*\)-default-cpu=.*'` + eval ${tmp}_default_cpu="$optarg" + ;; --enable-trace-backend=*) trace_backend="$optarg" ;; --with-trace-file=*) trace_file="$optarg" @@ -951,6 +955,7 @@ echo " use %M for cpu name [$interp_prefix]" echo " --target-list=LIST set target list (default: build everything)" echo "Available targets: $default_target_list" | \ fold -s -w 53 | sed -e 's/^/ /' +echo " --ARCH-default-cpu=CPU set the default cpu for a given architecture" echo "" echo "Advanced options (experts only):" echo " --source-path=PATH path of source code [$source_path]" @@ -3531,6 +3536,10 @@ case "$target_arch2" in exit 1 ;; esac +tmp_target_default_cpu=`eval echo \\$${target_arch2}_default_cpu` +if [ "x$tmp_target_default_cpu" != "x" ] ; then + target_default_cpu="$tmp_target_default_cpu" +fi echo "TARGET_SHORT_ALIGNMENT=$target_short_alignment" >> $config_target_mak echo "TARGET_INT_ALIGNMENT=$target_int_alignment" >> $config_target_mak echo "TARGET_LONG_ALIGNMENT=$target_long_alignment" >> $config_target_mak