On 10 May 2014 10:16, Doug Kwan <dougk...@google.com> wrote:
> diff --git a/linux-user/uname.c b/linux-user/uname.c
> index f5d4c66..cb1f9a3 100644
> --- a/linux-user/uname.c
> +++ b/linux-user/uname.c
> @@ -65,6 +65,12 @@ const char *cpu_to_uname_machine(void *cpu_env)
>          return "i586";
>      }
>      return "i686";
> +#elif defined(TARGET_PPC64)
> +#ifdef TARGET_WORDS_BIGENDIAN
> +    return UNAME_MACHINE;
> +#else
> +    return UNAME_MACHINE "le";
> +#endif
>  #else
>      /* default is #define-d in each arch/ subdir */
>      return UNAME_MACHINE;

I think it would be nicer just to define UNAME_MACHINE correctly
in linux-user/ppc/syscall.h. We should restrict the per-CPU ifdefs
in uname.c to just those CPUs which need to pick the uname based
on runtime CPU features.

thanks
-- PMM

Reply via email to