]> git.proxmox.com Git - qemu.git/commitdiff
main: use TARGET_ARCH only for the target-specific #define
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 4 Jun 2013 12:45:27 +0000 (14:45 +0200)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 14 Jun 2013 14:33:11 +0000 (15:33 +0100)
Everything else needs to match the executable name, which is
TARGET_NAME.

Before:
    $ sh4eb-linux-user/qemu-sh4eb --help
    usage: qemu-sh4 [options] program [arguments...]
    Linux CPU emulator (compiled for sh4 emulation)

After:
    $ sh4eb-linux-user/qemu-sh4eb --help
    usage: qemu-sh4eb [options] program [arguments...]
    Linux CPU emulator (compiled for sh4eb emulation)

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1370349928-20419-5-git-send-email-pbonzini@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
arch_init.c
bsd-user/main.c
configure
linux-user/main.c
scripts/create_config

index 5d32ecf23a06ee659158ccad1001207503729dac..23ca953cb518abba67cf6f7a35f2d949c6cdb286 100644 (file)
@@ -123,7 +123,7 @@ static struct defconfig_file {
     bool userconfig;
 } default_config_files[] = {
     { CONFIG_QEMU_CONFDIR "/qemu.conf",                   true },
-    { CONFIG_QEMU_CONFDIR "/target-" TARGET_ARCH ".conf", true },
+    { CONFIG_QEMU_CONFDIR "/target-" TARGET_NAME ".conf", true },
     { NULL }, /* end of list */
 };
 
index 0da3ab9e21278c3bf7524c116503dede570c8800..572f13afe4b4e7305ab9f056bc88abc99a572ca0 100644 (file)
@@ -670,8 +670,8 @@ void cpu_loop(CPUSPARCState *env)
 
 static void usage(void)
 {
-    printf("qemu-" TARGET_ARCH " version " QEMU_VERSION ", Copyright (c) 2003-2008 Fabrice Bellard\n"
-           "usage: qemu-" TARGET_ARCH " [options] program [arguments...]\n"
+    printf("qemu-" TARGET_NAME " version " QEMU_VERSION ", Copyright (c) 2003-2008 Fabrice Bellard\n"
+           "usage: qemu-" TARGET_NAME " [options] program [arguments...]\n"
            "BSD CPU emulator (compiled for %s emulation)\n"
            "\n"
            "Standard options:\n"
@@ -706,7 +706,7 @@ static void usage(void)
            "Note that if you provide several changes to single variable\n"
            "last change will stay in effect.\n"
            ,
-           TARGET_ARCH,
+           TARGET_NAME,
            interp_prefix,
            x86_stack_size);
     exit(1);
index 1dfa71283f5f3c0cd3235e62d8bfe2860e6df1b8..46a2173c1f9d5dcf3647b203c80f21008eaf137b 100755 (executable)
--- a/configure
+++ b/configure
@@ -4243,7 +4243,6 @@ upper() {
     echo "$@"| LC_ALL=C tr '[a-z]' '[A-Z]'
 }
 
-echo "TARGET_ARCH=$TARGET_ARCH" >> $config_target_mak
 target_arch_name="`upper $TARGET_ARCH`"
 echo "TARGET_$target_arch_name=y" >> $config_target_mak
 echo "TARGET_NAME=$target_name" >> $config_target_mak
index b97b8cfd33a12eb5043f38025052fb50c4b4b422..21725a4971a36acbbad6fc69e8ebc19667657610 100644 (file)
@@ -3339,7 +3339,7 @@ static void handle_arg_strace(const char *arg)
 
 static void handle_arg_version(const char *arg)
 {
-    printf("qemu-" TARGET_ARCH " version " QEMU_VERSION QEMU_PKGVERSION
+    printf("qemu-" TARGET_NAME " version " QEMU_VERSION QEMU_PKGVERSION
            ", Copyright (c) 2003-2008 Fabrice Bellard\n");
     exit(0);
 }
@@ -3400,8 +3400,8 @@ static void usage(void)
     int maxarglen;
     int maxenvlen;
 
-    printf("usage: qemu-" TARGET_ARCH " [options] program [arguments...]\n"
-           "Linux CPU emulator (compiled for " TARGET_ARCH " emulation)\n"
+    printf("usage: qemu-" TARGET_NAME " [options] program [arguments...]\n"
+           "Linux CPU emulator (compiled for " TARGET_NAME " emulation)\n"
            "\n"
            "Options and associated environment variables:\n"
            "\n");
index 6461ef6059f5b46e0917a6d19e260e8f232b6a4d..b1adbf5897784e3c0f3d07c135d78f1f9e11685d 100755 (executable)
@@ -77,16 +77,10 @@ case $line in
     value=${line#*=}
     echo "#define $name $value"
     ;;
- TARGET_ARCH=*) # configuration
-    target_arch=${line#*=}
-    echo "#define TARGET_ARCH \"$target_arch\""
-    ;;
  TARGET_BASE_ARCH=*) # configuration
     target_base_arch=${line#*=}
-    if [ "$target_base_arch" != "$target_arch" ]; then
-      base_arch_name=`echo $target_base_arch | LC_ALL=C tr '[a-z]' '[A-Z]'`
-      echo "#define TARGET_$base_arch_name 1"
-    fi
+    base_arch_name=`echo $target_base_arch | LC_ALL=C tr '[a-z]' '[A-Z]'`
+    echo "#define TARGET_$base_arch_name 1"
     ;;
  TARGET_XML_FILES=*)
     # do nothing
@@ -95,7 +89,8 @@ case $line in
     # do nothing
     ;;
  TARGET_NAME=*)
-    # do nothing
+    target_name=${line#*=}
+    echo "#define TARGET_NAME \"$target_name\""
     ;;
  TARGET_DIRS=*)
     # do nothing