Pullup ticket #4411 - requested by bouer sysutils/xenkernel3: fix build on NetBSD 6.x Revisions pulled up: - sysutils/xenkernel3/distinfo 1.19 - sysutils/xenkernel3/patches/patch-ae 1.4 - sysutils/xenkernel3/patches/patch-xen_include_xen_compat.h 1.1 --- Module Name: pkgsrc Committed By: bouyer Date: Wed May 14 20:21:19 UTC 2014 Modified Files: pkgsrc/sysutils/xenkernel3: distinfo pkgsrc/sysutils/xenkernel3/patches: patch-ae Added Files: pkgsrc/sysutils/xenkernel3/patches: patch-xen_include_xen_compat.h Log Message: 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 functionsdiff -r1.18 -r1.18.6.1 pkgsrc/sysutils/xenkernel3/distinfo
(schnoebe)
@@ -1,21 +1,22 @@ | @@ -1,21 +1,22 @@ | |||
1 | $NetBSD: distinfo,v 1.18 2013/07/13 19:43:21 joerg Exp $ | 1 | $NetBSD: distinfo,v 1.18.6.1 2014/05/21 04:05:15 schnoebe Exp $ | |
2 | 2 | |||
3 | SHA1 (xen-3.1.4.tar.gz) = 0d784662776239195df10b3f29d40350f9d0644d | 3 | SHA1 (xen-3.1.4.tar.gz) = 0d784662776239195df10b3f29d40350f9d0644d | |
4 | RMD160 (xen-3.1.4.tar.gz) = c02ad2bd64e6306b127a4f37a8aa370dadc11859 | 4 | RMD160 (xen-3.1.4.tar.gz) = c02ad2bd64e6306b127a4f37a8aa370dadc11859 | |
5 | Size (xen-3.1.4.tar.gz) = 6894493 bytes | 5 | Size (xen-3.1.4.tar.gz) = 6894493 bytes | |
6 | SHA1 (patch-SA45835) = 7af53cb3da8720954242c4c90165bceef362c184 | 6 | SHA1 (patch-SA45835) = 7af53cb3da8720954242c4c90165bceef362c184 | |
7 | SHA1 (patch-aa) = 1be644e7edd3735c2850d3e581002f53bd50eb59 | 7 | SHA1 (patch-aa) = 1be644e7edd3735c2850d3e581002f53bd50eb59 | |
8 | SHA1 (patch-ac) = 4c237984832ef5532e0451845e8075b95744e48d | 8 | SHA1 (patch-ac) = 4c237984832ef5532e0451845e8075b95744e48d | |
9 | SHA1 (patch-ae) = 37b1c8d6cc66983d971fe41654cc8cefde87104a | 9 | SHA1 (patch-ae) = 902629e6dcebca4fe98a915b465ba063dc554e64 | |
10 | SHA1 (patch-ba) = cadfa6f2626e95c9ccb85ae7e3a8a7f318ea343f | 10 | SHA1 (patch-ba) = cadfa6f2626e95c9ccb85ae7e3a8a7f318ea343f | |
11 | SHA1 (patch-bb) = 7338e5a512c909d4b043654dab882761de274f94 | 11 | SHA1 (patch-bb) = 7338e5a512c909d4b043654dab882761de274f94 | |
12 | SHA1 (patch-bc) = fa35699da6ad2a4950418a02432c2ccdb5d34844 | 12 | SHA1 (patch-bc) = fa35699da6ad2a4950418a02432c2ccdb5d34844 | |
13 | SHA1 (patch-bd) = 2a07955b1285d288458066813f8ebc801b8038c1 | 13 | SHA1 (patch-bd) = 2a07955b1285d288458066813f8ebc801b8038c1 | |
14 | SHA1 (patch-cw) = b08804b3a6df64194d662c92af1f0738a52e67b2 | 14 | SHA1 (patch-cw) = b08804b3a6df64194d662c92af1f0738a52e67b2 | |
15 | SHA1 (patch-da) = 6db74e00d15615e71936fa8637a05159f378b454 | 15 | SHA1 (patch-da) = 6db74e00d15615e71936fa8637a05159f378b454 | |
16 | SHA1 (patch-db) = 8e7b563fd816669fd39e1e8bf5137b5937060968 | 16 | SHA1 (patch-db) = 8e7b563fd816669fd39e1e8bf5137b5937060968 | |
17 | SHA1 (patch-dc) = 606ad2af582b88ddfd250b952831af9d3b2b1f5d | 17 | SHA1 (patch-dc) = 606ad2af582b88ddfd250b952831af9d3b2b1f5d | |
18 | SHA1 (patch-gcc-version) = 1174ace3eee1d3707a2935498ac5a39671913f9f | 18 | SHA1 (patch-gcc-version) = 1174ace3eee1d3707a2935498ac5a39671913f9f | |
19 | SHA1 (patch-xen_arch_x86_hvm_io.c) = 0f6dfc3b3857c2ab43fabf2c9693e2932b442931 | 19 | SHA1 (patch-xen_arch_x86_hvm_io.c) = 0f6dfc3b3857c2ab43fabf2c9693e2932b442931 | |
20 | SHA1 (patch-xen_arch_x86_string.c) = 363d521a627d07cd9caffcfe1c529342b3b67321 | 20 | SHA1 (patch-xen_arch_x86_string.c) = 363d521a627d07cd9caffcfe1c529342b3b67321 | |
21 | SHA1 (patch-xen_common_libelf_libelf-private.h) = c364d8f247342c62d0d32fe9f4714f83f977719a | 21 | SHA1 (patch-xen_common_libelf_libelf-private.h) = c364d8f247342c62d0d32fe9f4714f83f977719a | |
22 | SHA1 (patch-xen_include_xen_compat.h) = d9a4524088e034cf718f17f20f856bd907271b29 |
@@ -1,25 +1,36 @@ | @@ -1,25 +1,36 @@ | |||
1 | $NetBSD: patch-ae,v 1.3 2011/07/19 18:53:54 jym Exp $ | 1 | $NetBSD: patch-ae,v 1.3.22.1 2014/05/21 04:05:15 schnoebe Exp $ | |
2 | - protect Xen's stdarg.h from multiple inclusion. | 2 | - protect Xen's stdarg.h from multiple inclusion. | |
3 | - build fix for stdarg under NetBSD. | 3 | - build fix for stdarg under NetBSD. | |
4 | 4 | |||
5 | Both backported from upstream. | 5 | Both backported from upstream. | |
6 | 6 | |||
7 | http://xenbits.xensource.com/hg/xen-unstable.hg/file/a574bf2f5059/xen/include/xen/stdarg.h | 7 | http://xenbits.xensource.com/hg/xen-unstable.hg/file/a574bf2f5059/xen/include/xen/stdarg.h | |
8 | --- xen/include/xen/stdarg.h.orig 2009-08-06 12:56:43.000000000 +0000 | 8 | --- xen/include/xen/stdarg.h.orig 2008-04-25 15:03:12.000000000 +0200 | |
9 | +++ xen/include/xen/stdarg.h | 9 | +++ xen/include/xen/stdarg.h 2014-05-14 16:11:10.000000000 +0200 | |
10 | @@ -1,5 +1,15 @@ | 10 | @@ -1,5 +1,26 @@ | |
11 | +#ifndef __XEN_STDARG_H__ | 11 | +#ifndef __XEN_STDARG_H__ | |
12 | +#define __XEN_STDARG_H__ | 12 | +#define __XEN_STDARG_H__ | |
13 | + | 13 | + | |
14 | #if defined(__OpenBSD__) | 14 | #if defined(__OpenBSD__) | |
15 | # include "/usr/include/stdarg.h" | 15 | # include "/usr/include/stdarg.h" | |
16 | +#elif defined (__NetBSD__) | 16 | +#elif defined (__NetBSD__) | |
17 | +#ifdef __GNUC__ | |||
18 | +#define __GNUC_PREREQ__(x, y) \ | |||
19 | + ((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) || \ | |||
20 | + (__GNUC__ > (x))) | |||
21 | +#else | |||
22 | +#define __GNUC_PREREQ__(x, y) 0 | |||
23 | +#endif | |||
17 | + typedef __builtin_va_list va_list; | 24 | + typedef __builtin_va_list va_list; | |
25 | +#if __GNUC_PREREQ__(4, 5) | |||
26 | +# define va_start(ap, last) __builtin_va_start((ap), (last)) | |||
27 | +#else | |||
18 | +# define va_start(ap, last) __builtin_stdarg_start((ap), (last)) | 28 | +# define va_start(ap, last) __builtin_stdarg_start((ap), (last)) | |
29 | +#endif /* __GNUC_PREREQ__ */ | |||
19 | +# define va_end(ap) __builtin_va_end(ap) | 30 | +# define va_end(ap) __builtin_va_end(ap) | |
20 | +# define va_arg __builtin_va_arg | 31 | +# define va_arg __builtin_va_arg | |
21 | #else | 32 | #else | |
22 | # include <stdarg.h> | 33 | # include <stdarg.h> | |
23 | #endif | 34 | #endif | |
24 | + | 35 | + | |
25 | +#endif /* __XEN_STDARG_H__ */ | 36 | +#endif /* __XEN_STDARG_H__ */ |
$NetBSD: patch-xen_include_xen_compat.h,v 1.1.2.2 2014/05/21 04:05:15 schnoebe 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, ...);