From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58781) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VWnMz-000332-5s for qemu-devel@nongnu.org; Thu, 17 Oct 2013 09:12:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VWnMt-0003mK-Bt for qemu-devel@nongnu.org; Thu, 17 Oct 2013 09:12:05 -0400 Received: from mail-qc0-x229.google.com ([2607:f8b0:400d:c01::229]:54293) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VWnMt-0003m5-85 for qemu-devel@nongnu.org; Thu, 17 Oct 2013 09:11:59 -0400 Received: by mail-qc0-f169.google.com with SMTP id x12so1524322qcv.28 for ; Thu, 17 Oct 2013 06:11:58 -0700 (PDT) Sender: Richard Henderson Message-ID: <525FE219.3090907@twiddle.net> Date: Thu, 17 Oct 2013 06:11:53 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1378850858-10799-1-git-send-email-rth@twiddle.net> <1378850858-10799-6-git-send-email-rth@twiddle.net> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 5/6] util: Provide fallback hwcap and platform for powerpc List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers , Aurelien Jarno On 10/17/2013 05:03 AM, Peter Maydell wrote: > On 10 September 2013 23:07, Richard Henderson wrote: >> Allow host "detection" on non-linux hosts. >> >> Signed-off-by: Richard Henderson >> --- >> 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~