From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Evans Subject: [PATCH V2 04/23] kvm tools: Get correct 64-bit types on PPC64 and link appropriately Date: Fri, 09 Dec 2011 17:53:50 +1100 Message-ID: <4EE1B07E.6070003@ozlabs.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: penberg@kernel.org, asias.hejun@gmail.com, levinsasha928@gmail.com, gorcunov@gmail.com To: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org Return-path: In-Reply-To: Sender: kvm-ppc-owner@vger.kernel.org List-Id: kvm.vger.kernel.org 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;