qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: qemu-devel@nongnu.org
Cc: Laurent Vivier <Laurent@Vivier.EU>
Subject: [Qemu-devel] [PATCH 2/4] linux-user: specify the cpu model during configure
Date: Sun, 22 Jan 2012 13:27:15 +0100	[thread overview]
Message-ID: <1327235237-30896-3-git-send-email-laurent@vivier.eu> (raw)
In-Reply-To: <1327235237-30896-1-git-send-email-laurent@vivier.eu>

From: Laurent Vivier <Laurent@Vivier.EU>

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 <Laurent@Vivier.EU>
---
 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
-- 
1.7.5.4

  parent reply	other threads:[~2012-01-22 12:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-22 12:27 [Qemu-devel] [PATCH 0/4] linux-user: A serie of patches to set default CPU Laurent Vivier
2012-01-22 12:27 ` [Qemu-devel] [PATCH 1/4] linux-user: define default cpu model in configure instead of linux-user/main.c Laurent Vivier
2012-01-22 12:27 ` Laurent Vivier [this message]
2012-01-22 12:27 ` [Qemu-devel] [PATCH 3/4] linux-user,m68k: display default cpu Laurent Vivier
2012-01-22 12:27 ` [Qemu-devel] [PATCH 4/4] linux-user,arm: " Laurent Vivier
2012-01-31 20:01 ` [Qemu-devel] [PATCH 0/4] linux-user: A serie of patches to set default CPU Riku Voipio
2012-01-31 22:27   ` Laurent Vivier
  -- strict thread matches above, loose matches on Subject: below --
2013-09-06 20:47 [Qemu-devel] [PATCH 0/4] Define default CPU at configure time Laurent Vivier
2013-09-06 20:47 ` [Qemu-devel] [PATCH 2/4] linux-user: specify the cpu model during configure Laurent Vivier
2011-09-18  9:37 [Qemu-devel] [PATCH 0/4] Set of patches for chrooted environment Laurent Vivier
2011-09-18  9:37 ` [Qemu-devel] [PATCH 2/4] linux-user: specify the cpu model during configure Laurent Vivier
2011-07-28 13:37 [Qemu-devel] [PATCH 0/4] Set of patches for chrooted environment Laurent Vivier
2011-07-28 13:37 ` [Qemu-devel] [PATCH 2/4] linux-user: specify the cpu model during configure Laurent Vivier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1327235237-30896-3-git-send-email-laurent@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).