From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sasha Levin Subject: Re: [PATCH V2 04/23] kvm tools: Get correct 64-bit types on PPC64 and link appropriately Date: Fri, 09 Dec 2011 10:24:16 +0200 Message-ID: <1323419056.32487.17.camel@lappy> References: <4EE1B07E.6070003@ozlabs.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, penberg@kernel.org, asias.hejun@gmail.com, gorcunov@gmail.com To: Matt Evans Return-path: Received: from mail-ey0-f174.google.com ([209.85.215.174]:43327 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751772Ab1LIIYj (ORCPT ); Fri, 9 Dec 2011 03:24:39 -0500 In-Reply-To: <4EE1B07E.6070003@ozlabs.org> Sender: kvm-owner@vger.kernel.org List-ID: If you also got kernel patches that add __SANE_USERSPACE_TYPES__ to the headers, and KVM_CAP_NR_VCPUS to KVM PPC, we can carry them in the KVM tools tree as well. On Fri, 2011-12-09 at 17:53 +1100, Matt Evans wrote: > kvmtool's types.h includes , which by default on PPC64 brings in > int-l64.h; define __SANE_USERSPACE_TYPES__ to get LL64 types. > > This patch also adds CFLAGS to the final link, so that any -m64 is obeyed > when linking, too. > > Signed-off-by: Matt Evans > --- > tools/kvm/Makefile | 2 +- > tools/kvm/include/linux/types.h | 1 + > 2 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/tools/kvm/Makefile b/tools/kvm/Makefile > index 009a6ba..57dc521 100644 > --- a/tools/kvm/Makefile > +++ b/tools/kvm/Makefile > @@ -218,7 +218,7 @@ KVMTOOLS-VERSION-FILE: > > $(PROGRAM): $(DEPS) $(OBJS) > $(E) " LINK " $@ > - $(Q) $(CC) $(OBJS) $(LIBS) -o $@ > + $(Q) $(CC) $(CFLAGS) $(OBJS) $(LIBS) -o $@ > > $(GUEST_INIT): guest/init.c > $(E) " LINK " $@ > diff --git a/tools/kvm/include/linux/types.h b/tools/kvm/include/linux/types.h > index 357799c..5e20f10 100644 > --- a/tools/kvm/include/linux/types.h > +++ b/tools/kvm/include/linux/types.h > @@ -2,6 +2,7 @@ > #define LINUX_TYPES_H > > #include > +#define __SANE_USERSPACE_TYPES__ /* For PPC64, to get LL64 types */ > #include > > typedef __u64 u64; -- Sasha.