diff options
author | cegger <cegger> | 2012-01-05 12:02:38 +0000 |
---|---|---|
committer | cegger <cegger> | 2012-01-05 12:02:38 +0000 |
commit | 0a7c1aa6e60337bf729680e8b3f559cf54bf1e62 (patch) | |
tree | 775653ef091eb4d8147cc94ad8d80523c73f62e9 /sysutils | |
parent | ccb98e0f43ba9c31740339b1aa314fcda4950249 (diff) | |
download | pkgsrc-0a7c1aa6e60337bf729680e8b3f559cf54bf1e62.tar.gz |
Apply fixes for gcc 4.5.
Fixes PR 45388. Bump pkg revision.
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/xenkernel33/Makefile | 4 | ||||
-rw-r--r-- | sysutils/xenkernel33/distinfo | 6 | ||||
-rw-r--r-- | sysutils/xenkernel33/patches/patch-ae | 24 | ||||
-rw-r--r-- | sysutils/xenkernel33/patches/patch-compat_memory_c | 31 | ||||
-rw-r--r-- | sysutils/xenkernel33/patches/patch-include_xen_compat_h | 89 |
5 files changed, 141 insertions, 13 deletions
diff --git a/sysutils/xenkernel33/Makefile b/sysutils/xenkernel33/Makefile index 567787c7958..4c98f927766 100644 --- a/sysutils/xenkernel33/Makefile +++ b/sysutils/xenkernel33/Makefile @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.16 2011/11/20 03:21:37 jym Exp $ +# $NetBSD: Makefile,v 1.17 2012/01/05 12:02:38 cegger Exp $ # VERSION= 3.3.2 DISTNAME= xen-${VERSION} PKGNAME= xenkernel33-${VERSION} -PKGREVISION= 4 +PKGREVISION= 5 CATEGORIES= sysutils MASTER_SITES= http://bits.xensource.com/oss-xen/release/${VERSION}/ EXTRACT_SUFX= .tar.gz diff --git a/sysutils/xenkernel33/distinfo b/sysutils/xenkernel33/distinfo index e79355bf99a..15da8ca5908 100644 --- a/sysutils/xenkernel33/distinfo +++ b/sysutils/xenkernel33/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.14 2011/09/10 18:35:51 bouyer Exp $ +$NetBSD: distinfo,v 1.15 2012/01/05 12:02:38 cegger Exp $ SHA1 (xen-3.3.2.tar.gz) = 7f438e73ac81b25cf5e1570709e87001066bafe4 RMD160 (xen-3.3.2.tar.gz) = 28faa56286f2a418e35dcba6079570ea871d6c7b @@ -8,4 +8,6 @@ SHA1 (patch-aa) = 0d11c758ad0a0ca657bf2e0f89ca23ff67b76bb7 SHA1 (patch-ab) = bba70c6a0f884a4bbfd2ce56e41ce0d649300edc SHA1 (patch-ac) = ed1dc87e4f1d80112befc63372bc91ee621f57e6 SHA1 (patch-ad) = e53ac3abf2a6a10c60cf288b994b3cf52a0d6486 -SHA1 (patch-ae) = 37b1c8d6cc66983d971fe41654cc8cefde87104a +SHA1 (patch-ae) = 9608381987e82b05ea34e16f82b88189cc415653 +SHA1 (patch-compat_memory_c) = f45daded92c0dac30213d6d7dcc81ac72ead7c47 +SHA1 (patch-include_xen_compat_h) = 96ba96ba31792f48c989f033f7706f09fd1171c2 diff --git a/sysutils/xenkernel33/patches/patch-ae b/sysutils/xenkernel33/patches/patch-ae index 16636684ab2..b7be0d47f6c 100644 --- a/sysutils/xenkernel33/patches/patch-ae +++ b/sysutils/xenkernel33/patches/patch-ae @@ -1,21 +1,27 @@ -$NetBSD: patch-ae,v 1.1 2011/07/19 18:54:12 jym Exp $ -- protect Xen's stdarg.h from multiple inclusion. -- build fix for stdarg under NetBSD. +$NetBSD: patch-ae,v 1.2 2012/01/05 12:02:38 cegger Exp $ -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.orig 2012-01-05 11:29:11.000000000 +0000 +++ xen/include/xen/stdarg.h -@@ -1,5 +1,15 @@ +@@ -1,5 +1,26 @@ +#ifndef __XEN_STDARG_H__ +#define __XEN_STDARG_H__ + #if defined(__OpenBSD__) # include "/usr/include/stdarg.h" +#elif defined (__NetBSD__) ++ /* Why not just include stdarg.h like everyone else? should explain */ + typedef __builtin_va_list va_list; -+# define va_start(ap, last) __builtin_stdarg_start((ap), (last)) ++# ifdef __GNUC__ ++# define __GNUC_PREREQ__(x, y) \ ++ ((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) || \ ++ (__GNUC__ > (x))) ++# else ++# define __GNUC_PREREQ__(x, y) 0 ++# endif ++# if !__GNUC_PREREQ__(4, 5) ++# define __builtin_va_start(ap, last) __builtin_stdarg_start((ap), (last)) ++# endif ++# define va_start(ap, last) __builtin_va_start((ap), (last)) +# define va_end(ap) __builtin_va_end(ap) +# define va_arg __builtin_va_arg #else diff --git a/sysutils/xenkernel33/patches/patch-compat_memory_c b/sysutils/xenkernel33/patches/patch-compat_memory_c new file mode 100644 index 00000000000..c91d5bf200a --- /dev/null +++ b/sysutils/xenkernel33/patches/patch-compat_memory_c @@ -0,0 +1,31 @@ +$NetBSD: patch-compat_memory_c,v 1.1 2012/01/05 12:02:38 cegger Exp $ + +--- xen/common/compat/memory.c.orig 2009-08-06 12:56:41.000000000 +0000 ++++ xen/common/compat/memory.c +@@ -7,6 +7,12 @@ + #include <asm/current.h> + #include <compat/memory.h> + ++#define xen_domid_t domid_t ++#define compat_domid_t domid_compat_t ++CHECK_TYPE(domid); ++#undef compat_domid_t ++#undef xen_domid_t ++ + int compat_memory_op(unsigned int cmd, XEN_GUEST_HANDLE(void) compat) + { + int rc, split, op = cmd & MEMOP_CMD_MASK; +@@ -171,13 +177,6 @@ int compat_memory_op(unsigned int cmd, X + case XENMEM_current_reservation: + case XENMEM_maximum_reservation: + case XENMEM_maximum_gpfn: +- { +-#define xen_domid_t domid_t +-#define compat_domid_t domid_compat_t +- CHECK_TYPE(domid); +-#undef compat_domid_t +-#undef xen_domid_t +- } + case XENMEM_maximum_ram_page: + nat.hnd = compat; + break; diff --git a/sysutils/xenkernel33/patches/patch-include_xen_compat_h b/sysutils/xenkernel33/patches/patch-include_xen_compat_h new file mode 100644 index 00000000000..52f27252c28 --- /dev/null +++ b/sysutils/xenkernel33/patches/patch-include_xen_compat_h @@ -0,0 +1,89 @@ +$NetBSD: patch-include_xen_compat_h,v 1.1 2012/01/05 12:02:38 cegger Exp $ + +--- xen/include/xen/compat.h.orig 2009-08-06 12:56:43.000000000 +0000 ++++ xen/include/xen/compat.h +@@ -128,44 +128,61 @@ + }) + + ++#define CHECK_NAME(name, tag) __check ## tag ## name ++#define CHECK_NAME_(k, n, tag) __check ## tag ## k ## _ ## n ++ + #define CHECK_TYPE(name) \ +- typedef int __checkT ## name[1 - ((xen_ ## name ## _t *)0 != \ +- (compat_ ## name ## _t *)0) * 2] ++static inline int CHECK_NAME(name, T)(xen_ ## name ## _t *x, \ ++ compat_ ## name ## _t *c) \ ++{ \ ++ return x == c; \ ++} + #define CHECK_TYPE_(k, n) \ +- typedef int __checkT ## k ## _ ## n[1 - ((k xen_ ## n *)0 != \ +- (k compat_ ## n *)0) * 2] ++static inline int CHECK_NAME_(k, n, T)(k xen_ ## n *x, \ ++ k compat_ ## n *c) \ ++{ \ ++ return x == c; \ ++} + + #define CHECK_SIZE(name) \ +- typedef int __checkS ## name[1 - (sizeof(xen_ ## name ## _t) != \ +- sizeof(compat_ ## name ## _t)) * 2] ++ typedef int CHECK_NAME(name, S)[1 - (sizeof(xen_ ## name ## _t) != \ ++ sizeof(compat_ ## name ## _t)) * 2] + #define CHECK_SIZE_(k, n) \ +- typedef int __checkS ## k ## _ ## n[1 - (sizeof(k xen_ ## n) != \ ++ typedef int CHECK_NAME_(k, n, S)[1 - (sizeof(k xen_ ## n) != \ + sizeof(k compat_ ## n)) * 2] + ++#define CHECK_FIELD_COMMON(name, t, f) \ ++static inline int name(xen_ ## t ## _t *x, compat_ ## t ## _t *c) \ ++{ \ ++ BUILD_BUG_ON(offsetof(xen_ ## t ## _t, f) != \ ++ offsetof(compat_ ## t ## _t, f)); \ ++ return &x->f == &c->f; \ ++} ++#define CHECK_FIELD_COMMON_(k, name, n, f) \ ++static inline int name(k xen_ ## n *x, k compat_ ## n *c) \ ++{ \ ++ BUILD_BUG_ON(offsetof(k xen_ ## n, f) != \ ++ offsetof(k compat_ ## n, f)); \ ++ return &x->f == &c->f; \ ++} ++ + #define CHECK_FIELD(t, f) \ +- typedef int __checkF ## t ## __ ## f[1 - (&((xen_ ## t ## _t *)0)->f != \ +- &((compat_ ## t ## _t *)0)->f) * 2] ++ CHECK_FIELD_COMMON(CHECK_NAME(t ## __ ## f, F), t, f) + #define CHECK_FIELD_(k, n, f) \ +- typedef int __checkF ## k ## _ ## n ## __ ## f[1 - (&((k xen_ ## n *)0)->f != \ +- &((k compat_ ## n *)0)->f) * 2] ++ CHECK_FIELD_COMMON_(k, CHECK_NAME_(k, n ## __ ## f, F), n, f) + + #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] ++ CHECK_FIELD_COMMON(CHECK_NAME(t ## __ ## f1 ## __ ## f2, F1), t, f1.f2) + #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] ++ CHECK_FIELD_COMMON_(k, CHECK_NAME_(k, n ## __ ## f1 ## __ ## f2, F1), \ ++ n, f1.f2) + + #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] ++ CHECK_FIELD_COMMON(CHECK_NAME(t ## __ ## f1 ## __ ## f2 ## __ ## f3, F2), \ ++ t, f1.f2.f3) + #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] ++ CHECK_FIELD_COMMON_(k, CHECK_NAME_(k, n ## __ ## f1 ## __ ## f2 ## __ ## \ ++ f3, F2), n, f1.f2.f3) + + int hypercall_xlat_continuation(unsigned int *id, unsigned int mask, ...); + |