qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 3/4] main: use TARGET_ARCH only for the target-s


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 3/4] main: use TARGET_ARCH only for the target-specific #define
Date: Tue, 28 May 2013 19:09:07 +0100

On 27 May 2013 12:34, Paolo Bonzini <address@hidden> wrote:
> 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 <address@hidden>
> ---
>  arch_init.c           |  2 +-
>  bsd-user/main.c       |  6 +++---
>  configure             | 25 +++++++++++++++----------
>  linux-user/main.c     |  6 +++---
>  scripts/create_config | 13 ++++---------
>  5 files changed, 26 insertions(+), 26 deletions(-)
>
> diff --git a/arch_init.c b/arch_init.c
> index 49c5dc2..22fbe96 100644
> --- a/arch_init.c
> +++ b/arch_init.c
> @@ -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 */

I note this changes user-visible behaviour since we're now
looking for different config files. Doesn't this need to be
documented somewhere? Or is it that we can get away with making
the change because it is undocumented?

> --- a/scripts/create_config
> +++ b/scripts/create_config
> @@ -70,16 +70,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"
>      ;;

This change means that (eg) arm-softmmu/config-target.h now has
two lines "#define TARGET_ARM 1", once because config-target.mak
has TARGET_ARM=y and once becgaues of TARGET_BASE_ARCH=arm.
I guess that's just cosmetic though.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]