diff options
author | bouyer <bouyer> | 2014-05-14 20:21:19 +0000 |
---|---|---|
committer | bouyer <bouyer> | 2014-05-14 20:21:19 +0000 |
commit | c951245d4ac4938f90380e80afb2062b63740b71 (patch) | |
tree | 630bf54e0bfa988a583fe012fd6db5d5d0c7def7 | |
parent | da246c56bcc32c8c1623c4f28d1c182e46aa88c2 (diff) | |
download | pkgsrc-c951245d4ac4938f90380e80afb2062b63740b71.tar.gz |
Make it build on netbsd-6:
- use proper va_start for gcc >= 4.5
- disable the CHECK_* macros, the newer gcc is more strict about what can
be used as array size outside functions
-rw-r--r-- | sysutils/xenkernel3/distinfo | 5 | ||||
-rw-r--r-- | sysutils/xenkernel3/patches/patch-ae | 19 | ||||
-rw-r--r-- | sysutils/xenkernel3/patches/patch-xen_include_xen_compat.h | 57 |
3 files changed, 75 insertions, 6 deletions
diff --git a/sysutils/xenkernel3/distinfo b/sysutils/xenkernel3/distinfo index 617d8cd4813..f6e909f696f 100644 --- a/sysutils/xenkernel3/distinfo +++ b/sysutils/xenkernel3/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.18 2013/07/13 19:43:21 joerg Exp $ +$NetBSD: distinfo,v 1.19 2014/05/14 20:21:19 bouyer Exp $ SHA1 (xen-3.1.4.tar.gz) = 0d784662776239195df10b3f29d40350f9d0644d RMD160 (xen-3.1.4.tar.gz) = c02ad2bd64e6306b127a4f37a8aa370dadc11859 @@ -6,7 +6,7 @@ Size (xen-3.1.4.tar.gz) = 6894493 bytes SHA1 (patch-SA45835) = 7af53cb3da8720954242c4c90165bceef362c184 SHA1 (patch-aa) = 1be644e7edd3735c2850d3e581002f53bd50eb59 SHA1 (patch-ac) = 4c237984832ef5532e0451845e8075b95744e48d -SHA1 (patch-ae) = 37b1c8d6cc66983d971fe41654cc8cefde87104a +SHA1 (patch-ae) = 902629e6dcebca4fe98a915b465ba063dc554e64 SHA1 (patch-ba) = cadfa6f2626e95c9ccb85ae7e3a8a7f318ea343f SHA1 (patch-bb) = 7338e5a512c909d4b043654dab882761de274f94 SHA1 (patch-bc) = fa35699da6ad2a4950418a02432c2ccdb5d34844 @@ -19,3 +19,4 @@ SHA1 (patch-gcc-version) = 1174ace3eee1d3707a2935498ac5a39671913f9f SHA1 (patch-xen_arch_x86_hvm_io.c) = 0f6dfc3b3857c2ab43fabf2c9693e2932b442931 SHA1 (patch-xen_arch_x86_string.c) = 363d521a627d07cd9caffcfe1c529342b3b67321 SHA1 (patch-xen_common_libelf_libelf-private.h) = c364d8f247342c62d0d32fe9f4714f83f977719a +SHA1 (patch-xen_include_xen_compat.h) = d9a4524088e034cf718f17f20f856bd907271b29 diff --git a/sysutils/xenkernel3/patches/patch-ae b/sysutils/xenkernel3/patches/patch-ae index 6441bf097f1..aa3c5a61a33 100644 --- a/sysutils/xenkernel3/patches/patch-ae +++ b/sysutils/xenkernel3/patches/patch-ae @@ -1,21 +1,32 @@ -$NetBSD: patch-ae,v 1.3 2011/07/19 18:53:54 jym Exp $ +$NetBSD: patch-ae,v 1.4 2014/05/14 20:21:19 bouyer Exp $ - protect Xen's stdarg.h from multiple inclusion. - build fix for stdarg under NetBSD. Both backported from upstream. http://xenbits.xensource.com/hg/xen-unstable.hg/file/a574bf2f5059/xen/include/xen/stdarg.h ---- xen/include/xen/stdarg.h.orig 2009-08-06 12:56:43.000000000 +0000 -+++ xen/include/xen/stdarg.h -@@ -1,5 +1,15 @@ +--- xen/include/xen/stdarg.h.orig 2008-04-25 15:03:12.000000000 +0200 ++++ xen/include/xen/stdarg.h 2014-05-14 16:11:10.000000000 +0200 +@@ -1,5 +1,26 @@ +#ifndef __XEN_STDARG_H__ +#define __XEN_STDARG_H__ + #if defined(__OpenBSD__) # include "/usr/include/stdarg.h" +#elif defined (__NetBSD__) ++#ifdef __GNUC__ ++#define __GNUC_PREREQ__(x, y) \ ++ ((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) || \ ++ (__GNUC__ > (x))) ++#else ++#define __GNUC_PREREQ__(x, y) 0 ++#endif + typedef __builtin_va_list va_list; ++#if __GNUC_PREREQ__(4, 5) ++# define va_start(ap, last) __builtin_va_start((ap), (last)) ++#else +# define va_start(ap, last) __builtin_stdarg_start((ap), (last)) ++#endif /* __GNUC_PREREQ__ */ +# define va_end(ap) __builtin_va_end(ap) +# define va_arg __builtin_va_arg #else diff --git a/sysutils/xenkernel3/patches/patch-xen_include_xen_compat.h b/sysutils/xenkernel3/patches/patch-xen_include_xen_compat.h new file mode 100644 index 00000000000..a276feca178 --- /dev/null +++ b/sysutils/xenkernel3/patches/patch-xen_include_xen_compat.h @@ -0,0 +1,57 @@ +$NetBSD: patch-xen_include_xen_compat.h,v 1.1 2014/05/14 20:21:19 bouyer Exp $ + +--- xen/include/xen/compat.h.orig 2008-04-25 15:03:12.000000000 +0200 ++++ xen/include/xen/compat.h 2014-05-14 16:24:55.000000000 +0200 +@@ -126,12 +126,8 @@ + }) + + +-#define CHECK_TYPE(name) \ +- typedef int __checkT ## name[1 - ((xen_ ## name ## _t *)0 != \ +- (compat_ ## name ## _t *)0) * 2] +-#define CHECK_TYPE_(k, n) \ +- typedef int __checkT ## k ## _ ## n[1 - ((k xen_ ## n *)0 != \ +- (k compat_ ## n *)0) * 2] ++#define CHECK_TYPE(name) /**/ ++#define CHECK_TYPE_(k, n) /**/ + + #define CHECK_SIZE(name) \ + typedef int __checkS ## name[1 - (sizeof(xen_ ## name ## _t) != \ +@@ -140,30 +136,13 @@ + typedef int __checkS ## k ## _ ## n[1 - (sizeof(k xen_ ## n) != \ + sizeof(k compat_ ## n)) * 2] + +-#define CHECK_FIELD(t, f) \ +- typedef int __checkF ## t ## __ ## f[1 - (&((xen_ ## t ## _t *)0)->f != \ +- &((compat_ ## t ## _t *)0)->f) * 2] +-#define CHECK_FIELD_(k, n, f) \ +- typedef int __checkF ## k ## _ ## n ## __ ## f[1 - (&((k xen_ ## n *)0)->f != \ +- &((k compat_ ## n *)0)->f) * 2] +- +-#define CHECK_SUBFIELD_1(t, f1, f2) \ +- typedef int __checkF1 ## t ## __ ## f1 ## __ ## f2 \ +- [1 - (&((xen_ ## t ## _t *)0)->f1.f2 != \ +- &((compat_ ## t ## _t *)0)->f1.f2) * 2] +-#define CHECK_SUBFIELD_1_(k, n, f1, f2) \ +- typedef int __checkF1 ## k ## _ ## n ## __ ## f1 ## __ ## f2 \ +- [1 - (&((k xen_ ## n *)0)->f1.f2 != \ +- &((k compat_ ## n *)0)->f1.f2) * 2] +- +-#define CHECK_SUBFIELD_2(t, f1, f2, f3) \ +- typedef int __checkF2 ## t ## __ ## f1 ## __ ## f2 ## __ ## f3 \ +- [1 - (&((xen_ ## t ## _t *)0)->f1.f2.f3 != \ +- &((compat_ ## t ## _t *)0)->f1.f2.f3) * 2] +-#define CHECK_SUBFIELD_2_(k, n, f1, f2, f3) \ +- typedef int __checkF2 ## k ## _ ## n ## __ ## f1 ## __ ## f2 ## __ ## f3 \ +- [1 - (&((k xen_ ## n *)0)->f1.f2.f3 != \ +- &((k compat_ ## n *)0)->f1.f2.f3) * 2] ++#define CHECK_FIELD(t, f) /**/ ++#define CHECK_FIELD_(k, n, f) /**/ ++#define CHECK_SUBFIELD_1(t, f1, f2) /**/ ++#define CHECK_SUBFIELD_1_(k, n, f1, f2) /**/ ++ ++#define CHECK_SUBFIELD_2(t, f1, f2, f3) /**/ ++#define CHECK_SUBFIELD_2_(k, n, f1, f2, f3) /**/ + + int hypercall_xlat_continuation(unsigned int *id, unsigned int mask, ...); + |