Re: [PATCH V2 04/23] kvm tools: Get correct 64-bit types on PPC64 and link appropriately

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <asm/types.h>, 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 <matt@xxxxxxxxxx>
> ---
>  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 <kvm/compiler.h>
> +#define __SANE_USERSPACE_TYPES__	/* For PPC64, to get LL64 types */
>  #include <asm/types.h>
>  
>  typedef __u64 u64;

-- 

Sasha.

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM Development]     [KVM ARM]     [KVM ia64]     [Linux Virtualization]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux