[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 5/6] util: Provide fallback hwcap and platfor
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH v2 5/6] util: Provide fallback hwcap and platform for powerpc |
Date: |
Thu, 17 Oct 2013 06:11:53 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 |
On 10/17/2013 05:03 AM, Peter Maydell wrote:
> On 10 September 2013 23:07, Richard Henderson <address@hidden> wrote:
>> Allow host "detection" on non-linux hosts.
>>
>> Signed-off-by: Richard Henderson <address@hidden>
>> ---
>> util/getauxval.c | 56
>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++--
>> 1 file changed, 54 insertions(+), 2 deletions(-)
>>
>> diff --git a/util/getauxval.c b/util/getauxval.c
>> index 59f53ff..e7f7d63 100644
>> --- a/util/getauxval.c
>> +++ b/util/getauxval.c
>> @@ -60,12 +60,64 @@ void qemu_init_auxval(char **envp)
>>
>> static const char *default_platform(void)
>> {
>> - return NULL;
>> + const char *ret = NULL;
>> +
>> +#ifdef _ARCH_PPC
>> +# if defined(_ARCH_PWR8)
>> + ret = "power8";
>> +# elif defined(_ARCH_PWR7)
>
> All these arch-specific ifdefs seem out of place in a
> generic util/ source file.
Where should they go? I'm tempted to drop this whole default thing...
r~