diff options
author | joerg <joerg> | 2013-04-11 19:57:51 +0000 |
---|---|---|
committer | joerg <joerg> | 2013-04-11 19:57:51 +0000 |
commit | 5dd7e297a4a285c9d5a5d8467aaa90f85eb7abc4 (patch) | |
tree | a48bd646c2a7b3e6340b8037d55ab035cbba1f29 | |
parent | 73c07034e8892725f26b05c708bceaedcba74c1d (diff) | |
download | pkgsrc-5dd7e297a4a285c9d5a5d8467aaa90f85eb7abc4.tar.gz |
Allow building Xen infrastructure with Clang. Fix various bugs in
xenkernel3, xenkernel41, xentools3 and xentools41 exposed by Clang
default warnings. Bump revisions for those.
39 files changed, 624 insertions, 38 deletions
diff --git a/sysutils/xenkernel3/Makefile b/sysutils/xenkernel3/Makefile index 7f4d6dad8ea..c428b9c6f89 100644 --- a/sysutils/xenkernel3/Makefile +++ b/sysutils/xenkernel3/Makefile @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.23 2012/10/23 19:51:36 asau Exp $ +# $NetBSD: Makefile,v 1.24 2013/04/11 19:57:51 joerg Exp $ # VERSION= 3.1.4 DISTNAME= xen-${VERSION} PKGNAME= xenkernel3-${VERSION} -PKGREVISION= 6 +PKGREVISION= 7 CATEGORIES= sysutils MASTER_SITES= http://bits.xensource.com/oss-xen/release/${VERSION}/ @@ -57,18 +57,28 @@ XENKERNELDIR= ${PREFIX}/xen3-kernel MESSAGE_SUBST+= XENKERNELDIR=${XENKERNELDIR:Q} +.include "../../mk/compiler.mk" +.if !empty(PKGSRC_COMPILER:Mclang) +EXTRA_CFLAGS+= -Wno-error=ignored-attributes -Wno-error=format \ + -Wno-error=tautological-compare \ + -Wno-error=parentheses-equality \ + -Wno-error=sometimes-uninitialized -no-integrated-as \ + -ffreestanding +.endif + do-build: - cd ${WRKSRC} && ${GMAKE} XEN_TARGET_X86_PAE=n debug=n xen + cd ${WRKSRC} && \ + EXTRA_CFLAGS=${EXTRA_CFLAGS:Q} ${GMAKE} XEN_TARGET_X86_PAE=n debug=n xen ${CP} ${WRKSRC}/dist/install/boot/xen.gz ${WRKDIR}/xen.gz cd ${WRKSRC} && ${GMAKE} clean && \ - ${GMAKE} XEN_TARGET_X86_PAE=n debug=y xen + EXTRA_CFLAGS=${EXTRA_CFLAGS:Q} ${GMAKE} XEN_TARGET_X86_PAE=n debug=y xen ${CP} ${WRKSRC}/dist/install/boot/xen.gz ${WRKDIR}/xen-debug.gz .if ${MACHINE_ARCH} == "i386" cd ${WRKSRC} && ${GMAKE} clean && \ - ${GMAKE} XEN_TARGET_X86_PAE=y debug=n xen + EXTRA_CFLAGS=${EXTRA_CFLAGS:Q} ${GMAKE} XEN_TARGET_X86_PAE=y debug=n xen ${CP} ${WRKSRC}/dist/install/boot/xen.gz ${WRKDIR}/xen-PAE.gz cd ${WRKSRC} && ${GMAKE} clean && \ - ${GMAKE} XEN_TARGET_X86_PAE=y debug=y xen + EXTRA_CFLAGS=${EXTRA_CFLAGS:Q} ${GMAKE} XEN_TARGET_X86_PAE=y debug=y xen ${CP} ${WRKSRC}/dist/install/boot/xen.gz ${WRKDIR}/xen-PAE-debug.gz .endif diff --git a/sysutils/xenkernel3/distinfo b/sysutils/xenkernel3/distinfo index 4aa6f253431..250a0559800 100644 --- a/sysutils/xenkernel3/distinfo +++ b/sysutils/xenkernel3/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.16 2011/11/20 03:43:30 jym Exp $ +$NetBSD: distinfo,v 1.17 2013/04/11 19:57:51 joerg Exp $ SHA1 (xen-3.1.4.tar.gz) = 0d784662776239195df10b3f29d40350f9d0644d RMD160 (xen-3.1.4.tar.gz) = c02ad2bd64e6306b127a4f37a8aa370dadc11859 @@ -11,8 +11,10 @@ SHA1 (patch-ba) = cadfa6f2626e95c9ccb85ae7e3a8a7f318ea343f SHA1 (patch-bb) = 7338e5a512c909d4b043654dab882761de274f94 SHA1 (patch-bc) = fa35699da6ad2a4950418a02432c2ccdb5d34844 SHA1 (patch-bd) = 2a07955b1285d288458066813f8ebc801b8038c1 -SHA1 (patch-cw) = 83a0f34dac9ba9a465c7362d4de6706afb84d688 +SHA1 (patch-cw) = b08804b3a6df64194d662c92af1f0738a52e67b2 SHA1 (patch-da) = 6db74e00d15615e71936fa8637a05159f378b454 SHA1 (patch-db) = 8e7b563fd816669fd39e1e8bf5137b5937060968 SHA1 (patch-dc) = 606ad2af582b88ddfd250b952831af9d3b2b1f5d SHA1 (patch-gcc-version) = 1174ace3eee1d3707a2935498ac5a39671913f9f +SHA1 (patch-xen_arch_x86_hvm_io.c) = 0f6dfc3b3857c2ab43fabf2c9693e2932b442931 +SHA1 (patch-xen_arch_x86_string.c) = 363d521a627d07cd9caffcfe1c529342b3b67321 diff --git a/sysutils/xenkernel3/patches/patch-cw b/sysutils/xenkernel3/patches/patch-cw index 143dacc787b..7a2a1e21007 100644 --- a/sysutils/xenkernel3/patches/patch-cw +++ b/sysutils/xenkernel3/patches/patch-cw @@ -1,4 +1,4 @@ -$NetBSD: patch-cw,v 1.2 2007/12/03 21:54:30 bouyer Exp $ +$NetBSD: patch-cw,v 1.3 2013/04/11 19:57:51 joerg Exp $ --- Config.mk.orig 2007-11-21 13:26:05.000000000 +0100 +++ Config.mk 2007-11-21 13:26:40.000000000 +0100 @@ -12,3 +12,14 @@ $NetBSD: patch-cw,v 1.2 2007/12/03 21:54:30 bouyer Exp $ XEN_TARGET_ARCH ?= $(XEN_COMPILE_ARCH) XEN_OS ?= $(shell uname -s) +@@ -72,8 +73,8 @@ CFLAGS += -Wall -Wstrict-prototypes + # result of any casted expression causes a warning. + CFLAGS += -Wno-unused-value + +-HOSTCFLAGS += $(call cc-option,$(HOSTCC),-Wdeclaration-after-statement,) +-CFLAGS += $(call cc-option,$(CC),-Wdeclaration-after-statement,) ++HOSTCFLAGS += $(call cc-option,$(HOSTCC),-Wdeclaration-after-statement,) ${EXTRA_CFLAGS} ++CFLAGS += $(call cc-option,$(CC),-Wdeclaration-after-statement,) ${EXTRA_CFLAGS} + + LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i)) + CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i)) diff --git a/sysutils/xenkernel3/patches/patch-xen_arch_x86_hvm_io.c b/sysutils/xenkernel3/patches/patch-xen_arch_x86_hvm_io.c new file mode 100644 index 00000000000..5ba1fd338c6 --- /dev/null +++ b/sysutils/xenkernel3/patches/patch-xen_arch_x86_hvm_io.c @@ -0,0 +1,13 @@ +$NetBSD: patch-xen_arch_x86_hvm_io.c,v 1.1 2013/04/11 19:57:51 joerg Exp $ + +--- xen/arch/x86/hvm/io.c.orig 2013-03-25 12:44:51.000000000 +0000 ++++ xen/arch/x86/hvm/io.c +@@ -338,7 +338,7 @@ static inline void set_eflags_OF(int siz + + if ( instr == INSTR_ADD ) + { +- if ((src ^ result) & (dst ^ result) & mask); ++ if ((src ^ result) & (dst ^ result) & mask) + regs->eflags |= X86_EFLAGS_OF; + } + else diff --git a/sysutils/xenkernel3/patches/patch-xen_arch_x86_string.c b/sysutils/xenkernel3/patches/patch-xen_arch_x86_string.c new file mode 100644 index 00000000000..429fdb33315 --- /dev/null +++ b/sysutils/xenkernel3/patches/patch-xen_arch_x86_string.c @@ -0,0 +1,26 @@ +$NetBSD: patch-xen_arch_x86_string.c,v 1.1 2013/04/11 19:57:51 joerg Exp $ + +--- xen/arch/x86/string.c.orig 2013-03-25 12:54:07.000000000 +0000 ++++ xen/arch/x86/string.c +@@ -8,6 +8,21 @@ + #include <xen/config.h> + #include <xen/lib.h> + ++#undef memcmp ++int ++memcmp(const void *s1, const void *s2, size_t n) ++{ ++ const unsigned char *p1 = s1; ++ const unsigned char *p2 = s2; ++ while (n-- != 0) { ++ if (*p1 != *p2) ++ return *p1 - *p2; ++ ++p1; ++ ++p2; ++ } ++ return 0; ++} ++ + #undef memcpy + void *memcpy(void *dest, const void *src, size_t n) + { diff --git a/sysutils/xenkernel33/Makefile b/sysutils/xenkernel33/Makefile index 67f3a4e23eb..ab8bf726766 100644 --- a/sysutils/xenkernel33/Makefile +++ b/sysutils/xenkernel33/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.20 2013/04/06 13:01:27 rodent Exp $ +# $NetBSD: Makefile,v 1.21 2013/04/11 19:57:51 joerg Exp $ # VERSION= 3.3.2 @@ -46,10 +46,18 @@ XENKERNELDIR= ${PREFIX}/${INSTALLATION_DIRS} MESSAGE_SUBST+= XENKERNELDIR=${XENKERNELDIR:Q} +.include "../../mk/compiler.mk" +.if !empty(PKGSRC_COMPILER:Mclang) +EXTRA_CFLAGS+= -Qunused-arguments -no-integrated-as -Wno-error=format \ + -Wno-error=parentheses-equality -Wno-error=enum-conversion \ + -Wno-error=tautological-compare +.endif + do-build: - cd ${WRKSRC} && ${GMAKE} debug=n xen + cd ${WRKSRC} && EXTRA_CFLAGS=${EXTRA_CFLAGS:Q} ${GMAKE} debug=n xen ${CP} ${WRKSRC}/dist/install/boot/xen.gz ${WRKDIR}/xen.gz - cd ${WRKSRC} && ${GMAKE} clean && ${GMAKE} debug=y xen + cd ${WRKSRC} && ${GMAKE} clean + cd ${WRKSRC} && EXTRA_CFLAGS=${EXTRA_CFLAGS:Q} ${GMAKE} debug=y xen ${CP} ${WRKSRC}/dist/install/boot/xen.gz ${WRKDIR}/xen-debug.gz do-install: diff --git a/sysutils/xenkernel33/distinfo b/sysutils/xenkernel33/distinfo index 2ad0a4eeb68..3d23347a39f 100644 --- a/sysutils/xenkernel33/distinfo +++ b/sysutils/xenkernel33/distinfo @@ -1,9 +1,10 @@ -$NetBSD: distinfo,v 1.16 2012/07/28 12:02:16 drochner Exp $ +$NetBSD: distinfo,v 1.17 2013/04/11 19:57:51 joerg Exp $ SHA1 (xen-3.3.2.tar.gz) = 7f438e73ac81b25cf5e1570709e87001066bafe4 RMD160 (xen-3.3.2.tar.gz) = 28faa56286f2a418e35dcba6079570ea871d6c7b Size (xen-3.3.2.tar.gz) = 11357576 bytes SHA1 (patch-CVE-2012-3432) = aed03164e9d05379c0a768bf29643c3e94eefce1 +SHA1 (patch-Config.mk) = a70e4e1f19d8a8f935a3f2b1b9d24e23e845b920 SHA1 (patch-SA45835) = 7d27c26ba947354bb5e279f3add9eb073a151477 SHA1 (patch-aa) = 0d11c758ad0a0ca657bf2e0f89ca23ff67b76bb7 SHA1 (patch-ab) = bba70c6a0f884a4bbfd2ce56e41ce0d649300edc @@ -12,3 +13,5 @@ SHA1 (patch-ad) = e53ac3abf2a6a10c60cf288b994b3cf52a0d6486 SHA1 (patch-ae) = 9608381987e82b05ea34e16f82b88189cc415653 SHA1 (patch-compat_memory_c) = f45daded92c0dac30213d6d7dcc81ac72ead7c47 SHA1 (patch-include_xen_compat_h) = 96ba96ba31792f48c989f033f7706f09fd1171c2 +SHA1 (patch-xen_Makefile) = 30d27b40fb8f5c4ee663a6a82abf36db3b7ebd1c +SHA1 (patch-xen_arch_x86_Rules.mk) = 81bdc8a653b57b5fcb9ae7d835f0284ab800dc21 diff --git a/sysutils/xenkernel33/patches/patch-Config.mk b/sysutils/xenkernel33/patches/patch-Config.mk new file mode 100644 index 00000000000..8f9b905cc68 --- /dev/null +++ b/sysutils/xenkernel33/patches/patch-Config.mk @@ -0,0 +1,13 @@ +$NetBSD: patch-Config.mk,v 1.1 2013/04/11 19:57:51 joerg Exp $ + +--- Config.mk.orig 2009-08-06 13:17:07.000000000 +0000 ++++ Config.mk +@@ -16,6 +16,8 @@ SHELL ?= /bin/sh + HOSTCC = gcc + HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer + HOSTCFLAGS += -fno-strict-aliasing ++HOSTCFLAGS += ${EXTRA_CFLAGS} ++CFLAGS += ${EXTRA_CFLAGS} + + DISTDIR ?= $(XEN_ROOT)/dist + DESTDIR ?= / diff --git a/sysutils/xenkernel33/patches/patch-xen_Makefile b/sysutils/xenkernel33/patches/patch-xen_Makefile new file mode 100644 index 00000000000..d71d57aeb4b --- /dev/null +++ b/sysutils/xenkernel33/patches/patch-xen_Makefile @@ -0,0 +1,13 @@ +$NetBSD: patch-xen_Makefile,v 1.1 2013/04/11 19:57:51 joerg Exp $ + +--- xen/Makefile.orig 2009-08-06 12:56:39.000000000 +0000 ++++ xen/Makefile +@@ -87,7 +87,7 @@ include/xen/compile.h: include/xen/compi + -e 's/@@whoami@@/$(XEN_WHOAMI)/g' \ + -e 's/@@domain@@/$(XEN_DOMAIN)/g' \ + -e 's/@@hostname@@/$(shell hostname)/g' \ +- -e 's!@@compiler@@!$(shell $(CC) $(CFLAGS) -v 2>&1 | tail -1)!g' \ ++ -e 's!@@compiler@@!$(shell $(CC) $(EXTRA_CFLAGS) $(CFLAGS) -v 2>&1 | tail -1)!g' \ + -e 's/@@version@@/$(XEN_VERSION)/g' \ + -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \ + -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \ diff --git a/sysutils/xenkernel33/patches/patch-xen_arch_x86_Rules.mk b/sysutils/xenkernel33/patches/patch-xen_arch_x86_Rules.mk new file mode 100644 index 00000000000..d248072ff63 --- /dev/null +++ b/sysutils/xenkernel33/patches/patch-xen_arch_x86_Rules.mk @@ -0,0 +1,12 @@ +$NetBSD: patch-xen_arch_x86_Rules.mk,v 1.1 2013/04/11 19:57:51 joerg Exp $ + +--- xen/arch/x86/Rules.mk.orig 2009-08-06 12:56:40.000000000 +0000 ++++ xen/arch/x86/Rules.mk +@@ -21,6 +21,7 @@ CFLAGS += -iwithprefix include -Werror - + CFLAGS += -I$(BASEDIR)/include + CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-generic + CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-default ++CFLAGS += $(EXTRA_CFLAGS) + + # Prevent floating-point variables from creeping into Xen. + CFLAGS += -msoft-float diff --git a/sysutils/xenkernel41/Makefile b/sysutils/xenkernel41/Makefile index be3ac7b5322..f10f1831462 100644 --- a/sysutils/xenkernel41/Makefile +++ b/sysutils/xenkernel41/Makefile @@ -1,9 +1,10 @@ -# $NetBSD: Makefile,v 1.18 2013/04/06 13:01:27 rodent Exp $ +# $NetBSD: Makefile,v 1.19 2013/04/11 19:57:51 joerg Exp $ # VERSION= 4.1.4 DISTNAME= xen-${VERSION} PKGNAME= xenkernel41-${VERSION} +PKGREVISION= 1 CATEGORIES= sysutils MASTER_SITES= http://bits.xensource.com/oss-xen/release/${VERSION}/ @@ -32,6 +33,14 @@ XENKERNELDIR= ${PREFIX}/${INSTALLATION_DIRS} MESSAGE_SUBST+= XENKERNELDIR=${XENKERNELDIR:Q} +.include "../../mk/compiler.mk" +.if !empty(PKGSRC_COMPILER:Mclang) +EXTRA_CFLAGS+= -Qunused-arguments -no-integrated-as -Wno-error=format \ + -Wno-error=parentheses-equality -Wno-error=enum-conversion +.endif + +MAKE_ENV+= EXTRA_CFLAGS=${EXTRA_CFLAGS:Q} + do-build: cd ${WRKSRC}/xen && ${BUILD_MAKE_CMD} debug=n build ${CP} ${WRKSRC}/xen/xen.gz ${WRKDIR}/xen.gz diff --git a/sysutils/xenkernel41/distinfo b/sysutils/xenkernel41/distinfo index 7a40065969a..6cda3da2c22 100644 --- a/sysutils/xenkernel41/distinfo +++ b/sysutils/xenkernel41/distinfo @@ -1,9 +1,14 @@ -$NetBSD: distinfo,v 1.14 2013/01/20 15:21:54 drochner Exp $ +$NetBSD: distinfo,v 1.15 2013/04/11 19:57:51 joerg Exp $ SHA1 (xen-4.1.4.tar.gz) = d5f1e9c9eeb96202dd827c196750530ffc64baab RMD160 (xen-4.1.4.tar.gz) = e3cb379954c985354dfd7dfbed15eae43e73254d Size (xen-4.1.4.tar.gz) = 10387283 bytes SHA1 (patch-CVE-2012-5511_2) = a345d28d4a6dcc4bf203243f49d66b5479fdbf14 SHA1 (patch-CVE-2012-5634) = 2992ee4972ec733a80fa3841d12a70a9076625c0 +SHA1 (patch-Config.mk) = a43ed1b3304d6383dc093acd128a7f373d0ca266 +SHA1 (patch-xen_Makefile) = d1c7e4860221f93d90818f45a77748882486f92b +SHA1 (patch-xen_arch_x86_Rules.mk) = 6b9b4bfa28924f7d3f6c793a389f1a7ac9d228e2 +SHA1 (patch-xen_arch_x86_cpu_mcheck_vmce.c) = 5afd01780a13654f1d21bf1562f6431c8370be0b +SHA1 (patch-xen_arch_x86_time.c) = 2dedd8ea1d372ecffea70aad448756dd3688cfba SHA1 (patch-xen_drivers_char_console_c) = 0fe186369602ccffaeec6f4bfbee8bb4298d3ff0 SHA1 (patch-xen_include_xen_stdarg.h) = e9df974a9b783ed442ab17497198432cb9844b70 diff --git a/sysutils/xenkernel41/patches/patch-Config.mk b/sysutils/xenkernel41/patches/patch-Config.mk new file mode 100644 index 00000000000..8bd5cdcb667 --- /dev/null +++ b/sysutils/xenkernel41/patches/patch-Config.mk @@ -0,0 +1,13 @@ +$NetBSD: patch-Config.mk,v 1.1 2013/04/11 19:57:51 joerg Exp $ + +--- Config.mk.orig 2012-12-18 12:54:16.000000000 +0000 ++++ Config.mk +@@ -16,6 +16,8 @@ SHELL ?= /bin/sh + HOSTCC = gcc + HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer + HOSTCFLAGS += -fno-strict-aliasing ++HOSTCFLAGS += ${EXTRA_CFLAGS} ++CFLAGS += ${EXTRA_CFLAGS} + + DISTDIR ?= $(XEN_ROOT)/dist + DESTDIR ?= / diff --git a/sysutils/xenkernel41/patches/patch-xen_Makefile b/sysutils/xenkernel41/patches/patch-xen_Makefile new file mode 100644 index 00000000000..c32b1cac297 --- /dev/null +++ b/sysutils/xenkernel41/patches/patch-xen_Makefile @@ -0,0 +1,13 @@ +$NetBSD: patch-xen_Makefile,v 1.1 2013/04/11 19:57:51 joerg Exp $ + +--- xen/Makefile.orig 2013-03-25 13:23:45.000000000 +0000 ++++ xen/Makefile +@@ -89,7 +89,7 @@ include/xen/compile.h: include/xen/compi + -e 's/@@whoami@@/$(XEN_WHOAMI)/g' \ + -e 's/@@domain@@/$(XEN_DOMAIN)/g' \ + -e 's/@@hostname@@/$(shell hostname)/g' \ +- -e 's!@@compiler@@!$(shell $(CC) $(CFLAGS) -v 2>&1 | tail -1)!g' \ ++ -e 's!@@compiler@@!$(shell $(CC) $(EXTRA_CFLAGS) $(CFLAGS) -v 2>&1 | tail -1)!g' \ + -e 's/@@version@@/$(XEN_VERSION)/g' \ + -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \ + -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \ diff --git a/sysutils/xenkernel41/patches/patch-xen_arch_x86_Rules.mk b/sysutils/xenkernel41/patches/patch-xen_arch_x86_Rules.mk new file mode 100644 index 00000000000..e433e0ce6e7 --- /dev/null +++ b/sysutils/xenkernel41/patches/patch-xen_arch_x86_Rules.mk @@ -0,0 +1,12 @@ +$NetBSD: patch-xen_arch_x86_Rules.mk,v 1.1 2013/04/11 19:57:51 joerg Exp $ + +--- xen/arch/x86/Rules.mk.orig 2013-03-25 13:28:19.000000000 +0000 ++++ xen/arch/x86/Rules.mk +@@ -21,6 +21,7 @@ CFLAGS += -iwithprefix include -Werror - + CFLAGS += -I$(BASEDIR)/include + CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-generic + CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-default ++CFLAGS += $(EXTRA_CFLAGS) + + # Prevent floating-point variables from creeping into Xen. + CFLAGS += -msoft-float diff --git a/sysutils/xenkernel41/patches/patch-xen_arch_x86_cpu_mcheck_vmce.c b/sysutils/xenkernel41/patches/patch-xen_arch_x86_cpu_mcheck_vmce.c new file mode 100644 index 00000000000..b29d6cfc309 --- /dev/null +++ b/sysutils/xenkernel41/patches/patch-xen_arch_x86_cpu_mcheck_vmce.c @@ -0,0 +1,31 @@ +$NetBSD: patch-xen_arch_x86_cpu_mcheck_vmce.c,v 1.1 2013/04/11 19:57:51 joerg Exp $ + +--- xen/arch/x86/cpu/mcheck/vmce.c.orig 2013-03-25 13:46:53.000000000 +0000 ++++ xen/arch/x86/cpu/mcheck/vmce.c +@@ -39,7 +39,7 @@ int vmce_init_msr(struct domain *d) + return -ENOMEM; + } + memset(dom_vmce(d)->mci_ctl, ~0, +- sizeof(dom_vmce(d)->mci_ctl)); ++ sizeof(*dom_vmce(d)->mci_ctl)); + + dom_vmce(d)->mcg_status = 0x0; + dom_vmce(d)->mcg_cap = g_mcg_cap; +@@ -369,7 +369,7 @@ static struct bank_entry* alloc_bank_ent + return NULL; + } + +- memset(entry, 0x0, sizeof(entry)); ++ memset(entry, 0x0, sizeof(*entry)); + INIT_LIST_HEAD(&entry->list); + return entry; + } +@@ -451,7 +451,7 @@ int vmce_init(struct cpuinfo_x86 *c) + return -ENOMEM; + } + /* Don't care banks before firstbank */ +- memset(h_mci_ctrl, 0xff, sizeof(h_mci_ctrl)); ++ memset(h_mci_ctrl, 0xff, sizeof(*h_mci_ctrl)); + for (i = firstbank; i < nr_mce_banks; i++) + rdmsrl(MSR_IA32_MCx_CTL(i), h_mci_ctrl[i]); + } diff --git a/sysutils/xenkernel41/patches/patch-xen_arch_x86_time.c b/sysutils/xenkernel41/patches/patch-xen_arch_x86_time.c new file mode 100644 index 00000000000..351ff072965 --- /dev/null +++ b/sysutils/xenkernel41/patches/patch-xen_arch_x86_time.c @@ -0,0 +1,35 @@ +$NetBSD: patch-xen_arch_x86_time.c,v 1.1 2013/04/11 19:57:52 joerg Exp $ + +--- xen/arch/x86/time.c.orig 2013-03-25 14:01:22.000000000 +0000 ++++ xen/arch/x86/time.c +@@ -105,7 +105,7 @@ static inline u32 mul_frac(u32 multiplic + { + u32 product_int, product_frac; + asm ( +- "mul %3" ++ "mull %3" + : "=a" (product_frac), "=d" (product_int) + : "0" (multiplicand), "r" (multiplier) ); + return product_int; +@@ -129,10 +129,10 @@ static inline u64 scale_delta(u64 delta, + + #ifdef CONFIG_X86_32 + asm ( +- "mul %5 ; " ++ "mull %5 ; " + "mov %4,%%eax ; " + "mov %%edx,%4 ; " +- "mul %5 ; " ++ "mull %5 ; " + "xor %5,%5 ; " + "add %4,%%eax ; " + "adc %5,%%edx ; " +@@ -140,7 +140,7 @@ static inline u64 scale_delta(u64 delta, + : "a" ((u32)delta), "1" ((u32)(delta >> 32)), "2" (scale->mul_frac) ); + #else + asm ( +- "mul %2 ; shrd $32,%1,%0" ++ "mulq %2 ; shrd $32,%1,%0" + : "=a" (product), "=d" (delta) + : "rm" (delta), "0" ((u64)scale->mul_frac) ); + #endif diff --git a/sysutils/xentools3-hvm/Makefile b/sysutils/xentools3-hvm/Makefile index 26bd69ecf21..11c114abd09 100644 --- a/sysutils/xentools3-hvm/Makefile +++ b/sysutils/xentools3-hvm/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.18 2012/10/23 19:51:36 asau Exp $ +# $NetBSD: Makefile,v 1.19 2013/04/11 19:57:52 joerg Exp $ # VERSION= 3.1.4 @@ -78,6 +78,16 @@ OWN_DIRS= ${PKG_SYSCONFDIR}/scripts INSTALLATION_DIRS= ${EGDIR} +.include "../../mk/compiler.mk" +.if !empty(PKGSRC_COMPILER:Mclang) +EXTRA_HOSTCFLAGS+= -Wno-error=ignored-attributes -Wno-error=format-security +EXTRA_CFLAGS+= -Wno-error=ignored-attributes -no-integrated-as \ + -Wno-error=tautological-compare -Wno-error=null-dereference \ + -Wno-error=self-assign -Wno-error=sometimes-uninitialized +.endif + +MAKE_ENV+= EXTRA_HOSTCFLAGS=${EXTRA_HOSTCFLAGS:Q} EXTRA_CFLAGS=${EXTRA_CFLAGS:Q} + pre-build: .if !exists(/usr/include/xen/xenio.h) ${MKDIR} ${WRKSRC}/libxc/xen diff --git a/sysutils/xentools3-hvm/distinfo b/sysutils/xentools3-hvm/distinfo index 4d2aac8196b..0b20704c159 100644 --- a/sysutils/xentools3-hvm/distinfo +++ b/sysutils/xentools3-hvm/distinfo @@ -1,8 +1,9 @@ -$NetBSD: distinfo,v 1.10 2012/05/14 15:39:52 manu Exp $ +$NetBSD: distinfo,v 1.11 2013/04/11 19:57:52 joerg Exp $ SHA1 (xen-3.1.4.tar.gz) = 0d784662776239195df10b3f29d40350f9d0644d RMD160 (xen-3.1.4.tar.gz) = c02ad2bd64e6306b127a4f37a8aa370dadc11859 Size (xen-3.1.4.tar.gz) = 6894493 bytes +SHA1 (patch-.._patch-Config.mk) = 5ce1a561c8e358ceff4187b7109702c85fa29af8 SHA1 (patch-aa) = 663c798a472501d4c38add5049faded5b7e807aa SHA1 (patch-an) = 37650fa861ed8219aa0682e84c5c8ba41a8cdff0 SHA1 (patch-ao) = 500f1921a73e3a4b7aa91bbd819a26f2327ac8b5 diff --git a/sysutils/xentools3-hvm/patches/patch-.._patch-Config.mk b/sysutils/xentools3-hvm/patches/patch-.._patch-Config.mk new file mode 100644 index 00000000000..b2e71623188 --- /dev/null +++ b/sysutils/xentools3-hvm/patches/patch-.._patch-Config.mk @@ -0,0 +1,26 @@ +$NetBSD: patch-.._patch-Config.mk,v 1.1 2013/04/11 19:57:52 joerg Exp $ + +--- ../Config.mk.orig 2011-12-07 10:40:48.000000000 +0000 ++++ ../Config.mk +@@ -19,7 +19,7 @@ SHELL ?= /bin/sh + # Tools to run on system hosting the build + HOSTCC = gcc + HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer +-HOSTCFLAGS += -fno-strict-aliasing ++HOSTCFLAGS += -fno-strict-aliasing ${EXTRA_HOSTCFLAGS} + HOSTCFLAGS_x86_32 = -m32 + HOSTCFLAGS_x86_64 = -m64 + HOSTCFLAGS += $(HOSTCFLAGS_$(XEN_COMPILE_ARCH)) +@@ -70,10 +70,11 @@ CFLAGS += -Wall -Wstrict-prototypes + + # -Wunused-value makes GCC 4.x too aggressive for my taste: ignoring the + # result of any casted expression causes a warning. +-CFLAGS += -Wno-unused-value ++CFLAGS += -Wno-unused-value -Wno-switch + + HOSTCFLAGS += $(call cc-option,$(HOSTCC),-Wdeclaration-after-statement,) + CFLAGS += $(call cc-option,$(CC),-Wdeclaration-after-statement,) ++CFLAGS += ${EXTRA_CFLAGS} + + LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i)) + CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i)) diff --git a/sysutils/xentools3/Makefile b/sysutils/xentools3/Makefile index 8319d414c67..d2bd5e6ea35 100644 --- a/sysutils/xentools3/Makefile +++ b/sysutils/xentools3/Makefile @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.32 2013/04/06 13:01:27 rodent Exp $ +# $NetBSD: Makefile,v 1.33 2013/04/11 19:57:52 joerg Exp $ # VERSION= 3.1.4 DISTNAME= xen-${VERSION} PKGNAME= xentools3-${VERSION} -PKGREVISION= 13 +PKGREVISION= 14 CATEGORIES= sysutils MASTER_SITES= http://bits.xensource.com/oss-xen/release/${VERSION}/ @@ -137,6 +137,16 @@ CONF_FILES_PERMS+= ${EGDIR}/${s} ${PKG_SYSCONFDIR}/scripts/${s} \ OWN_DIRS= ${PKG_SYSCONFDIR}/scripts /var/log/xen +.include "../../mk/compiler.mk" +.if !empty(PKGSRC_COMPILER:Mclang) +EXTRA_HOSTCFLAGS+= -Wno-error=ignored-attributes -Wno-error=format-security +EXTRA_CFLAGS+= -Wno-error=ignored-attributes -no-integrated-as \ + -Wno-error=tautological-compare -Wno-error=null-dereference \ + -Wno-error=self-assign -Wno-error=sometimes-uninitialized +.endif + +MAKE_ENV+= EXTRA_HOSTCFLAGS=${EXTRA_HOSTCFLAGS:Q} EXTRA_CFLAGS=${EXTRA_CFLAGS:Q} + pre-build: .if !exists(/usr/include/xen/xenio.h) ${MKDIR} ${WRKSRC}/libxc/xen diff --git a/sysutils/xentools3/distinfo b/sysutils/xentools3/distinfo index b441ec49313..ccdbd6ff261 100644 --- a/sysutils/xentools3/distinfo +++ b/sysutils/xentools3/distinfo @@ -1,9 +1,9 @@ -$NetBSD: distinfo,v 1.15 2012/05/14 15:39:52 manu Exp $ +$NetBSD: distinfo,v 1.16 2013/04/11 19:57:52 joerg Exp $ SHA1 (xen-3.1.4.tar.gz) = 0d784662776239195df10b3f29d40350f9d0644d RMD160 (xen-3.1.4.tar.gz) = c02ad2bd64e6306b127a4f37a8aa370dadc11859 Size (xen-3.1.4.tar.gz) = 6894493 bytes -SHA1 (patch-.._patch-Config.mk) = af18346fb13d1dc9e56e7d01057d2cebfbbaba14 +SHA1 (patch-.._patch-Config.mk) = 5ce1a561c8e358ceff4187b7109702c85fa29af8 SHA1 (patch-aa) = dca8b8de73b9bdbb17f8245224575eb881cdf00d SHA1 (patch-ab) = dcafc8b6c4cd1e4dfc6f4ec806fd8076b3104b86 SHA1 (patch-ac) = d6d895e0361194cd84da13c42e17e17efecae7dd @@ -31,7 +31,7 @@ SHA1 (patch-cb) = 0bf2513749e28ff955caabd76bf79dd8280b61ed SHA1 (patch-cc) = 3e618c7da953115e7b3c7fe07f17b75ef2c2bb34 SHA1 (patch-cd) = a692eea5dcbf90536ffbbd2b934772bdefda5664 SHA1 (patch-cf) = 05c5e86d33d31a2216c2751a2bf684c8d5d06746 -SHA1 (patch-cg) = 36073c7327f187702203108b3e7596178aac3327 +SHA1 (patch-cg) = e01915fc13291920106318b30681719cd226ff53 SHA1 (patch-ch) = ebe2aedf1ecd1dce66f4a8a25ef5e83ee1d4c60d SHA1 (patch-cj) = 5227c180e9ec2cf7146ade6f250f6bdff8f2bda1 SHA1 (patch-ck) = 3783d9b4b9344670bae2f35e2ac7f11e2ec9ce7b @@ -63,5 +63,6 @@ SHA1 (patch-dk) = 5685f52835885635eacd305945653f817bbe8a2a SHA1 (patch-dl) = 480b515da8773e4d3cfc305d74f833f16bb12750 SHA1 (patch-dm) = af4b849dfb54454e08acd0618afc0a81572bcbc3 SHA1 (patch-dn) = 1b6490b8f75ab9fe4d66d444fdacdde7db38131d +SHA1 (patch-libxc_xc__dom__x86.c) = 098e42cef3a5e34b1b4b941d9f8709e8a97e60f6 SHA1 (patch-python_xen_util_xmlrpcclient.py) = 227db87dee15cfb7bedd67d6c118983b4dae2e34 SHA1 (patch-python_xen_util_xmlrpclib2.py) = 0fc01ed0511ccff6942453f3592a6939b60ab0c0 diff --git a/sysutils/xentools3/patches/patch-.._patch-Config.mk b/sysutils/xentools3/patches/patch-.._patch-Config.mk index 5776172af84..04128e65e5c 100644 --- a/sysutils/xentools3/patches/patch-.._patch-Config.mk +++ b/sysutils/xentools3/patches/patch-.._patch-Config.mk @@ -1,8 +1,17 @@ -$NetBSD: patch-.._patch-Config.mk,v 1.1 2011/12/07 15:22:28 joerg Exp $ +$NetBSD: patch-.._patch-Config.mk,v 1.2 2013/04/11 19:57:52 joerg Exp $ --- ../Config.mk.orig 2011-12-07 10:40:48.000000000 +0000 +++ ../Config.mk -@@ -70,7 +70,7 @@ CFLAGS += -Wall -Wstrict-prototypes +@@ -19,7 +19,7 @@ SHELL ?= /bin/sh + # Tools to run on system hosting the build + HOSTCC = gcc + HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer +-HOSTCFLAGS += -fno-strict-aliasing ++HOSTCFLAGS += -fno-strict-aliasing ${EXTRA_HOSTCFLAGS} + HOSTCFLAGS_x86_32 = -m32 + HOSTCFLAGS_x86_64 = -m64 + HOSTCFLAGS += $(HOSTCFLAGS_$(XEN_COMPILE_ARCH)) +@@ -70,10 +70,11 @@ CFLAGS += -Wall -Wstrict-prototypes # -Wunused-value makes GCC 4.x too aggressive for my taste: ignoring the # result of any casted expression causes a warning. @@ -11,3 +20,7 @@ $NetBSD: patch-.._patch-Config.mk,v 1.1 2011/12/07 15:22:28 joerg Exp $ HOSTCFLAGS += $(call cc-option,$(HOSTCC),-Wdeclaration-after-statement,) CFLAGS += $(call cc-option,$(CC),-Wdeclaration-after-statement,) ++CFLAGS += ${EXTRA_CFLAGS} + + LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i)) + CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i)) diff --git a/sysutils/xentools3/patches/patch-cg b/sysutils/xentools3/patches/patch-cg index beb75034982..29f197b22c7 100644 --- a/sysutils/xentools3/patches/patch-cg +++ b/sysutils/xentools3/patches/patch-cg @@ -1,7 +1,7 @@ -$NetBSD: patch-cg,v 1.2 2007/11/17 16:45:32 bouyer Exp $ +$NetBSD: patch-cg,v 1.3 2013/04/11 19:57:52 joerg Exp $ ---- xenstat/xentop/xentop.c.orig 2007-05-18 16:45:21.000000000 +0200 -+++ xenstat/xentop/xentop.c 2007-11-17 14:50:57.000000000 +0100 +--- xenstat/xentop/xentop.c.orig 2008-04-25 13:03:12.000000000 +0000 ++++ xenstat/xentop/xentop.c @@ -18,7 +18,8 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA @@ -24,7 +24,16 @@ $NetBSD: patch-cg,v 1.2 2007/11/17 16:45:32 bouyer Exp $ #include <xenstat.h> -@@ -740,10 +745,11 @@ +@@ -251,7 +256,7 @@ static void fail(const char *str) + { + if(cwin != NULL && !isendwin()) + endwin(); +- fprintf(stderr, str); ++ fprintf(stderr, "%s", str); + exit(1); + } + +@@ -752,10 +757,11 @@ void do_summary(void) unsigned i, num_domains = 0; unsigned long long used = 0; xenstat_domain *domain; @@ -38,7 +47,7 @@ $NetBSD: patch-cg,v 1.2 2007/11/17 16:45:32 bouyer Exp $ num_domains = xenstat_node_num_domains(cur_node); ver_str = xenstat_node_xen_version(cur_node); print("xentop - %s Xen %s\n", time_str, ver_str); -@@ -909,6 +915,7 @@ +@@ -921,6 +927,7 @@ void do_network(xenstat_domain *domain) /* Output all VBD information */ void do_vbd(xenstat_domain *domain) { @@ -46,7 +55,7 @@ $NetBSD: patch-cg,v 1.2 2007/11/17 16:45:32 bouyer Exp $ int i = 0; xenstat_vbd *vbd; unsigned num_vbds = 0; -@@ -933,6 +940,7 @@ +@@ -952,6 +959,7 @@ void do_vbd(xenstat_domain *domain) xenstat_vbd_rd_reqs(vbd), xenstat_vbd_wr_reqs(vbd)); } diff --git a/sysutils/xentools3/patches/patch-libxc_xc__dom__x86.c b/sysutils/xentools3/patches/patch-libxc_xc__dom__x86.c new file mode 100644 index 00000000000..0deecb72121 --- /dev/null +++ b/sysutils/xentools3/patches/patch-libxc_xc__dom__x86.c @@ -0,0 +1,22 @@ +$NetBSD: patch-libxc_xc__dom__x86.c,v 1.1 2013/04/11 19:57:52 joerg Exp $ + +--- libxc/xc_dom_x86.c.orig 2013-03-25 20:08:33.000000000 +0000 ++++ libxc/xc_dom_x86.c +@@ -418,7 +418,7 @@ static int start_info_x86_32(struct xc_d + xc_dom_printf("%s: called\n", __FUNCTION__); + + memset(start_info, 0, sizeof(*start_info)); +- sprintf(start_info->magic, dom->guest_type); ++ snprintf(start_info->magic, sizeof(start_info->magic), "%s", dom->guest_type); + start_info->nr_pages = dom->total_pages; + start_info->shared_info = shinfo << PAGE_SHIFT_X86; + start_info->pt_base = dom->pgtables_seg.vstart; +@@ -457,7 +457,7 @@ static int start_info_x86_64(struct xc_d + xc_dom_printf("%s: called\n", __FUNCTION__); + + memset(start_info, 0, sizeof(*start_info)); +- sprintf(start_info->magic, dom->guest_type); ++ snprintf(start_info->magic, sizeof(start_info->magic), "%s", dom->guest_type); + start_info->nr_pages = dom->total_pages; + start_info->shared_info = shinfo << PAGE_SHIFT_X86; + start_info->pt_base = dom->pgtables_seg.vstart; diff --git a/sysutils/xentools33/Makefile b/sysutils/xentools33/Makefile index 512eb6a47a0..2a440b87ab5 100644 --- a/sysutils/xentools33/Makefile +++ b/sysutils/xentools33/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.36 2013/04/06 13:01:27 rodent Exp $ +# $NetBSD: Makefile,v 1.37 2013/04/11 19:57:52 joerg Exp $ # VERSION= 3.3.2 @@ -146,6 +146,16 @@ CONF_FILES_PERMS+= ${EGDIR}/${s} ${PKG_SYSCONFDIR}/scripts/${s} \ OWN_DIRS= ${PKG_SYSCONFDIR}/scripts /var/log/xen +.include "../../mk/compiler.mk" +.if !empty(PKGSRC_COMPILER:Mclang) +EXTRA_HOSTCFLAGS+= -Wno-error=ignored-attributes -Wno-error=format-security +EXTRA_CFLAGS+= -Wno-error=ignored-attributes -no-integrated-as \ + -Wno-error=tautological-compare -Wno-error=null-dereference \ + -Wno-error=self-assign -Wno-error=sometimes-uninitialized +.endif + +MAKE_ENV+= EXTRA_HOSTCFLAGS=${EXTRA_HOSTCFLAGS:Q} EXTRA_CFLAGS=${EXTRA_CFLAGS:Q} + pre-build: rm -f ${WRKSRC}/check/check_x11_devel .for s in ${BLKTAP_FILES} diff --git a/sysutils/xentools33/distinfo b/sysutils/xentools33/distinfo index 70aec99d591..2487fee9edb 100644 --- a/sysutils/xentools33/distinfo +++ b/sysutils/xentools33/distinfo @@ -1,11 +1,11 @@ -$NetBSD: distinfo,v 1.28 2012/04/07 13:10:56 bsiegert Exp $ +$NetBSD: distinfo,v 1.29 2013/04/11 19:57:52 joerg Exp $ SHA1 (xen-3.3.2.tar.gz) = 7f438e73ac81b25cf5e1570709e87001066bafe4 RMD160 (xen-3.3.2.tar.gz) = 28faa56286f2a418e35dcba6079570ea871d6c7b Size (xen-3.3.2.tar.gz) = 11357576 bytes SHA1 (patch-CVE-2011-1583) = c9f59d9fbb20f0cb76733a4c2d136a67253cae0a SHA1 (patch-aa) = 74c3023e39baf488f8bae060e93f6175b32df61a -SHA1 (patch-ab) = a73636bf27ad45fbdda791cb2b65254d26a5b899 +SHA1 (patch-ab) = 393c908858c81e526462a07de9b38fb449d294c3 SHA1 (patch-ac) = 70af1b1a787b9dad9e41a2ffe14d595c6797b4d7 SHA1 (patch-ad) = ccd63ed718e5ba3a742f181ae84af82e85f2f0c4 SHA1 (patch-ae) = bb7116a71bf6637591b639511f055836a13d9887 @@ -27,6 +27,7 @@ SHA1 (patch-bh) = a072c1e2dd21aa284303b5fcc7eae5ff841a5fbc SHA1 (patch-bi) = 49c1b77b451b63cfe3a1fded7f6d0410d4c3cf92 SHA1 (patch-bj) = 4c6b6a73d3ea5fb2c57b12dd4651f59024119276 SHA1 (patch-bk) = a79256edc3dc2a5f4bcdbe1a2d14037ad74f11de +SHA1 (patch-blktap_drivers_block-qcow.c) = 035411d811171fea46c8dec6534018370ef22e14 SHA1 (patch-blktaplib_h) = a37ecaaefcd694be54bb75163339650be69f9250 SHA1 (patch-ca) = b62ec8f0db5e65d737d1aaf3bd44580f5969328b SHA1 (patch-cb) = 9b7834e367a1820f28c0c1053d3f351751a12283 @@ -56,6 +57,7 @@ SHA1 (patch-fe) = 85d42672766fe8ce2dc7f745938722710c6ee5a3 SHA1 (patch-ff) = 6ff97fa4f34f29c276e4aaab4b4db9ccf7b09957 SHA1 (patch-fg) = 913295d341c1dd5bf4d1ef78f27520920f138d4c SHA1 (patch-io_ring_h) = 83b01462d5d2b48b4f97b3d9a7980aa3300ad0b3 +SHA1 (patch-ioemu_block-vvfat.c) = 4e6d998fe2c006bb68caaf8e1d11e641319ff5c2 SHA1 (patch-python_xen_util_xmlrpcclient.py) = 2f983bc67930b86b538743dab6bc81d9aacc6b35 SHA1 (patch-python_xen_util_xmlrpclib2.py) = 4977ebd86c7d76e1dc861c0f839c506446e384a5 SHA1 (patch-qemu-e1000-CVSE-2012-0029) = 8628504e1dfd013254f816cb4feeb7548b9ad2ec diff --git a/sysutils/xentools33/patches/patch-ab b/sysutils/xentools33/patches/patch-ab index 975f8df09c7..3b031566afd 100644 --- a/sysutils/xentools33/patches/patch-ab +++ b/sysutils/xentools33/patches/patch-ab @@ -1,7 +1,16 @@ -$NetBSD: patch-ab,v 1.2 2011/12/07 15:22:59 joerg Exp $ +$NetBSD: patch-ab,v 1.3 2013/04/11 19:57:52 joerg Exp $ --- ../Config.mk.orig 2009-08-06 13:17:07.000000000 +0000 +++ ../Config.mk +@@ -15,7 +15,7 @@ SHELL ?= /bin/sh + # Tools to run on system hosting the build + HOSTCC = gcc + HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer +-HOSTCFLAGS += -fno-strict-aliasing ++HOSTCFLAGS += -fno-strict-aliasing ${EXTRA_HOSTCFLAGS} + + DISTDIR ?= $(XEN_ROOT)/dist + DESTDIR ?= / @@ -66,7 +66,7 @@ CFLAGS += -Wall -Wstrict-prototypes # -Wunused-value makes GCC 4.x too aggressive for my taste: ignoring the @@ -11,7 +20,16 @@ $NetBSD: patch-ab,v 1.2 2011/12/07 15:22:59 joerg Exp $ HOSTCFLAGS += $(call cc-option,$(HOSTCC),-Wdeclaration-after-statement,) CFLAGS += $(call cc-option,$(CC),-Wdeclaration-after-statement,) -@@ -90,7 +90,7 @@ QEMU_REMOTE=http://xenbits.xensource.com +@@ -74,6 +74,8 @@ CFLAGS += $(call cc-option,$(CC),-Wd + LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i)) + CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i)) + ++CFLAGS += $(EXTRA_CFLAGS) ++ + # Enable XSM security module. Enabling XSM requires selection of an + # XSM security module (FLASK_ENABLE or ACM_SECURITY). + XSM_ENABLE ?= n +@@ -90,7 +92,7 @@ QEMU_REMOTE=http://xenbits.xensource.com # Specify which qemu-dm to use. This may be `ioemu' to use the old # Mercurial in-tree version, or a local directory, or a git URL. diff --git a/sysutils/xentools33/patches/patch-blktap_drivers_block-qcow.c b/sysutils/xentools33/patches/patch-blktap_drivers_block-qcow.c new file mode 100644 index 00000000000..9791a35d655 --- /dev/null +++ b/sysutils/xentools33/patches/patch-blktap_drivers_block-qcow.c @@ -0,0 +1,14 @@ +$NetBSD: patch-blktap_drivers_block-qcow.c,v 1.1 2013/04/11 19:57:53 joerg Exp $ + +--- blktap/drivers/block-qcow.c.orig 2013-03-28 16:51:10.000000000 +0000 ++++ blktap/drivers/block-qcow.c +@@ -1078,7 +1078,8 @@ static int tdqcow_close(struct disk_driv + offset = sizeof(QCowHeader) + sizeof(uint32_t); + lseek(fd, offset, SEEK_SET); + out = cpu_to_be32(cksum); +- if (write(fd, &out, sizeof(uint32_t))) ; ++ if (write(fd, &out, sizeof(uint32_t))) ++ ; + close(fd); + } + diff --git a/sysutils/xentools33/patches/patch-ioemu_block-vvfat.c b/sysutils/xentools33/patches/patch-ioemu_block-vvfat.c new file mode 100644 index 00000000000..127c53d3c40 --- /dev/null +++ b/sysutils/xentools33/patches/patch-ioemu_block-vvfat.c @@ -0,0 +1,13 @@ +$NetBSD: patch-ioemu_block-vvfat.c,v 1.1 2013/04/11 19:57:53 joerg Exp $ + +--- ioemu/block-vvfat.c.orig 2013-03-28 16:52:33.000000000 +0000 ++++ ioemu/block-vvfat.c +@@ -175,7 +175,7 @@ static inline int array_roll(array_t* ar + return 0; + } + +-inline int array_remove_slice(array_t* array,int index, int count) ++static inline int array_remove_slice(array_t* array,int index, int count) + { + assert(index >=0); + assert(count > 0); diff --git a/sysutils/xentools41/Makefile b/sysutils/xentools41/Makefile index 768633676df..9900e45e7b7 100644 --- a/sysutils/xentools41/Makefile +++ b/sysutils/xentools41/Makefile @@ -1,11 +1,11 @@ -# $NetBSD: Makefile,v 1.29 2013/03/15 16:10:57 is Exp $ +# $NetBSD: Makefile,v 1.30 2013/04/11 19:57:53 joerg Exp $ # # VERSION is set in version.mk as it is shared with other packages .include "version.mk" DISTNAME= xen-${VERSION} PKGNAME= xentools41-${VERSION} -PKGREVISION= 2 +PKGREVISION= 3 CATEGORIES= sysutils MASTER_SITES= http://bits.xensource.com/oss-xen/release/${VERSION}/ @@ -176,6 +176,17 @@ post-install: CPPFLAGS+= -Dshm_open=open -Dshm_unlink=unlink .endif +.include "../../mk/compiler.mk" +.if !empty(PKGSRC_COMPILER:Mclang) +EXTRA_HOSTCFLAGS+= -Wno-error=ignored-attributes +EXTRA_CFLAGS+= -Wno-error=ignored-attributes -no-integrated-as \ + -Wno-error=tautological-compare -Wno-error=null-dereference \ + -Wno-error=empty-body -Wno-error=self-assign \ + -Wno-error=sometimes-uninitialized +.endif + +MAKE_ENV+= EXTRA_HOSTCFLAGS=${EXTRA_HOSTCFLAGS:Q} EXTRA_CFLAGS=${EXTRA_CFLAGS:Q} + .include "../../lang/python/application.mk" .include "../../lang/python/extension.mk" .include "../../textproc/py-xml/buildlink3.mk" diff --git a/sysutils/xentools41/distinfo b/sysutils/xentools41/distinfo index dd464eb726c..12360ba136e 100644 --- a/sysutils/xentools41/distinfo +++ b/sysutils/xentools41/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.26 2013/03/15 16:10:57 is Exp $ +$NetBSD: distinfo,v 1.27 2013/04/11 19:57:53 joerg Exp $ SHA1 (ipxe-git-v1.0.0.tar.gz) = da052c8de5f3485fe0253c19cf52ed6d72528485 RMD160 (ipxe-git-v1.0.0.tar.gz) = dcd9b6eaafa1ce05c1ebf2a15f2f73ad7a8c5547 @@ -6,6 +6,10 @@ Size (ipxe-git-v1.0.0.tar.gz) = 1996881 bytes SHA1 (xen-4.1.4.tar.gz) = d5f1e9c9eeb96202dd827c196750530ffc64baab RMD160 (xen-4.1.4.tar.gz) = e3cb379954c985354dfd7dfbed15eae43e73254d Size (xen-4.1.4.tar.gz) = 10387283 bytes +SHA1 (patch-.._.._ipxe_src_arch_i386_include_librm.h) = 4549ac641b112321b4731a918d85219c3fce6808 +SHA1 (patch-.._.._ipxe_src_core_settings.c) = 240ff973757403b983f12b2cbed826584c4a8aba +SHA1 (patch-.._.._ipxe_src_net_tls.c) = c0cfbc2ab2b92c659c146601c4f80d58c951ca62 +SHA1 (patch-.._Config.mk) = 9b971a41f67bb3974d3a4459bb9d96fbbd636c96 SHA1 (patch-CVE-2012-6075) = 9de84238489875d94245d4f6ce3689629bb318ee SHA1 (patch-aa) = 9b53ba4a809dad7a1de34c8fa0dbe493d7256ada SHA1 (patch-ab) = 0906a5ec3a7450fc987b01289e2560e60966d00d @@ -37,6 +41,9 @@ SHA1 (patch-dc) = d860fe3725978227278d58f09e7d5157001e463e SHA1 (patch-dd) = e66d9cc0028ba922b050fc142862b4095cd018f3 SHA1 (patch-de) = fae94b61a430a1a7dd98c9a6a04e4513824c6d8d SHA1 (patch-df) = d20bf9d3fd05f5334f77c9154bf0fb9944c1292c +SHA1 (patch-examples_Makefile) = da39a3ee5e6b4b0d3255bfef95601890afd80709 +SHA1 (patch-firmware_hvmloader_Makefile) = b2914e4988ba004d45403d67f1580b1f9725d006 +SHA1 (patch-hotplug_common_Makefile) = da39a3ee5e6b4b0d3255bfef95601890afd80709 SHA1 (patch-ioemu-qemu-xen_hw_pass-through.c) = 76185c239078f29cb42b953d6c2cd1f59e240989 SHA1 (patch-ioemu-qemu-xen_hw_pass-through.h) = 98c26798d1ad99d3eee8b33deb08f747c958c886 SHA1 (patch-ioemu-qemu-xen_hw_piix4acpi.c) = ca19457e9bde2d844a86a866960ac6de1f3d084c @@ -44,6 +51,7 @@ SHA1 (patch-ioemu-qemu-xen_hw_pt-graphics.c) = 3c03404f1d711c667559a1332e717a5f1 SHA1 (patch-ioemu-qemu-xen_hw_pt-msi.c) = 2dcebc65f591988bb95dea74c3b21f7066154a9f SHA1 (patch-ioemu-qemu-xen_hw_pt-msi.h) = d1bb1a8ad90d6577056f11df96f5469ffe74a3b0 SHA1 (patch-ioemu-qemu-xen_xen-hooks.mak) = a00d9a9fd0fbb9fd89788b9dfaf5b389a28d47e2 +SHA1 (patch-libcx_xc__dom__boot.c) = 0507c2d7fe194f2d11a367fb1840b5d36da66cb1 SHA1 (patch-libxl_libxl_create.c) = 02b661ca684609939c6ef762c0ddd1c5e62ad4d0 SHA1 (patch-libxl_libxl_internal.h) = e126e5e998117903f0c66cc370d350c504ed33d9 SHA1 (patch-ocaml_Makefile.rules) = 104f9d40186e5e4ca6a2e6359bbb369c3c91d1dc @@ -51,4 +59,5 @@ SHA1 (patch-ocaml_common.make) = c59d32301198d65691ab23529dd791de5ac40199 SHA1 (patch-ocaml_xenstored_define.ml) = f44841625554ceba6e83dbb41f688993c2a8d9a2 SHA1 (patch-ocaml_xenstored_utils.ml) = cc792a696743fa348b274b1c23783ea1a0d7da47 SHA1 (patch-qemu-phy-devices) = fef90e50ef0a58db2f2b49b6c23218f371791de5 +SHA1 (patch-xenstat_libxenstat_Makefile) = d797b824afd98ec3dd17c5f9ac1307f0eaab8214 SHA1 (patch-xenstore_Makefile) = 4fa0ed7b76a96011c3cca9c5017be4b5151489f7 diff --git a/sysutils/xentools41/patches/patch-.._.._ipxe_src_arch_i386_include_librm.h b/sysutils/xentools41/patches/patch-.._.._ipxe_src_arch_i386_include_librm.h new file mode 100644 index 00000000000..8627e8a2470 --- /dev/null +++ b/sysutils/xentools41/patches/patch-.._.._ipxe_src_arch_i386_include_librm.h @@ -0,0 +1,16 @@ +$NetBSD: patch-.._.._ipxe_src_arch_i386_include_librm.h,v 1.1 2013/04/11 19:57:53 joerg Exp $ + +--- ../../ipxe/src/arch/i386/include/librm.h.orig 2010-02-02 16:12:44.000000000 +0000 ++++ ../../ipxe/src/arch/i386/include/librm.h +@@ -122,8 +122,9 @@ extern char *text16; + _data16_ ## variable __asm__ ( #variable ) + + #define __bss16_array( variable, array ) \ +- __attribute__ (( section ( ".bss16" ) )) \ +- _data16_ ## variable array __asm__ ( #variable ) ++ _data16_ ## variable array \ ++ __asm__ ( #variable ) \ ++ __attribute__ (( section ( ".bss16" ) )) + + #define __text16( variable ) \ + __attribute__ (( section ( ".text16.data" ) )) \ diff --git a/sysutils/xentools41/patches/patch-.._.._ipxe_src_core_settings.c b/sysutils/xentools41/patches/patch-.._.._ipxe_src_core_settings.c new file mode 100644 index 00000000000..5b5bdbc27d6 --- /dev/null +++ b/sysutils/xentools41/patches/patch-.._.._ipxe_src_core_settings.c @@ -0,0 +1,34 @@ +$NetBSD: patch-.._.._ipxe_src_core_settings.c,v 1.1 2013/04/11 19:57:53 joerg Exp $ + +--- ../../ipxe/src/core/settings.c.orig 2013-03-25 18:48:57.000000000 +0000 ++++ ../../ipxe/src/core/settings.c +@@ -263,10 +263,12 @@ static struct settings * find_child_sett + */ + static struct settings * autovivify_child_settings ( struct settings *parent, + const char *name ) { ++ size_t nlen = strlen ( name ) + 1 /* NUL */; + struct { + struct generic_settings generic; +- char name[ strlen ( name ) + 1 /* NUL */ ]; ++ char name[]; + } *new_child; ++ size_t tlen = sizeof(*new_child) + nlen; + struct settings *settings; + + /* Return existing settings, if existent */ +@@ -274,13 +276,13 @@ static struct settings * autovivify_chil + return settings; + + /* Create new generic settings block */ +- new_child = zalloc ( sizeof ( *new_child ) ); ++ new_child = zalloc ( tlen ); + if ( ! new_child ) { + DBGC ( parent, "Settings %p could not create child %s\n", + parent, name ); + return NULL; + } +- memcpy ( new_child->name, name, sizeof ( new_child->name ) ); ++ memcpy ( new_child->name, name, nlen ); + generic_settings_init ( &new_child->generic, NULL, new_child->name ); + settings = &new_child->generic.settings; + register_settings ( settings, parent ); diff --git a/sysutils/xentools41/patches/patch-.._.._ipxe_src_net_tls.c b/sysutils/xentools41/patches/patch-.._.._ipxe_src_net_tls.c new file mode 100644 index 00000000000..6a3da777c66 --- /dev/null +++ b/sysutils/xentools41/patches/patch-.._.._ipxe_src_net_tls.c @@ -0,0 +1,69 @@ +$NetBSD: patch-.._.._ipxe_src_net_tls.c,v 1.1 2013/04/11 19:57:53 joerg Exp $ + +--- ../../ipxe/src/net/tls.c.orig 2013-03-25 18:53:57.000000000 +0000 ++++ ../../ipxe/src/net/tls.c +@@ -650,18 +650,22 @@ static int tls_send_client_key_exchange + RSA_CTX *rsa_ctx; + RSA_pub_key_new ( &rsa_ctx, tls->rsa.modulus, tls->rsa.modulus_len, + tls->rsa.exponent, tls->rsa.exponent_len ); ++ size_t elen = rsa_ctx->num_octets; + struct { + uint32_t type_length; + uint16_t encrypted_pre_master_secret_len; +- uint8_t encrypted_pre_master_secret[rsa_ctx->num_octets]; +- } __attribute__ (( packed )) key_xchg; +- +- memset ( &key_xchg, 0, sizeof ( key_xchg ) ); +- key_xchg.type_length = ( cpu_to_le32 ( TLS_CLIENT_KEY_EXCHANGE ) | +- htonl ( sizeof ( key_xchg ) - +- sizeof ( key_xchg.type_length ) ) ); +- key_xchg.encrypted_pre_master_secret_len +- = htons ( sizeof ( key_xchg.encrypted_pre_master_secret ) ); ++ uint8_t encrypted_pre_master_secret[]; ++ } __attribute__ (( packed )) *key_xchg; ++ size_t klen = sizeof(*key_xchg) + elen; ++ ++ key_xchg = alloca(klen); ++ ++ memset ( key_xchg, 0, klen ); ++ key_xchg->type_length = ( cpu_to_le32 ( TLS_CLIENT_KEY_EXCHANGE ) | ++ htonl ( klen - ++ sizeof ( key_xchg->type_length ) ) ); ++ key_xchg->encrypted_pre_master_secret_len ++ = htons ( elen ); + + /* FIXME: Hack alert */ + DBGC ( tls, "RSA encrypting plaintext, modulus, exponent:\n" ); +@@ -671,14 +675,13 @@ static int tls_send_client_key_exchange + DBGC_HD ( tls, tls->rsa.exponent, tls->rsa.exponent_len ); + RSA_encrypt ( rsa_ctx, ( const uint8_t * ) &tls->pre_master_secret, + sizeof ( tls->pre_master_secret ), +- key_xchg.encrypted_pre_master_secret, 0 ); ++ key_xchg->encrypted_pre_master_secret, 0 ); + DBGC ( tls, "RSA encrypt done. Ciphertext:\n" ); +- DBGC_HD ( tls, &key_xchg.encrypted_pre_master_secret, +- sizeof ( key_xchg.encrypted_pre_master_secret ) ); ++ DBGC_HD ( tls, &key_xchg->encrypted_pre_master_secret, elen ); + RSA_free ( rsa_ctx ); + + +- return tls_send_handshake ( tls, &key_xchg, sizeof ( key_xchg ) ); ++ return tls_send_handshake ( tls, key_xchg, klen ); + } + + /** +@@ -802,12 +805,12 @@ static int tls_new_server_hello ( struct + uint8_t session_id_len; + char next[0]; + } __attribute__ (( packed )) *hello_a = data; ++ size_t slen = hello_a->session_id_len; + struct { +- uint8_t session_id[hello_a->session_id_len]; + uint16_t cipher_suite; + uint8_t compression_method; + char next[0]; +- } __attribute__ (( packed )) *hello_b = ( void * ) &hello_a->next; ++ } __attribute__ (( packed )) *hello_b = ( void * ) ((uint8_t *)&hello_a->next + slen); + void *end = hello_b->next; + int rc; + diff --git a/sysutils/xentools41/patches/patch-.._Config.mk b/sysutils/xentools41/patches/patch-.._Config.mk new file mode 100644 index 00000000000..9bf3cef29cd --- /dev/null +++ b/sysutils/xentools41/patches/patch-.._Config.mk @@ -0,0 +1,22 @@ +$NetBSD: patch-.._Config.mk,v 1.1 2013/04/11 19:57:53 joerg Exp $ + +--- ../Config.mk.orig 2013-03-25 09:51:57.000000000 +0000 ++++ ../Config.mk +@@ -15,7 +15,7 @@ SHELL ?= /bin/sh + # Tools to run on system hosting the build + HOSTCC = gcc + HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer +-HOSTCFLAGS += -fno-strict-aliasing ++HOSTCFLAGS += -fno-strict-aliasing ${EXTRA_HOSTCFLAGS} + + DISTDIR ?= $(XEN_ROOT)/dist + DESTDIR ?= / +@@ -141,6 +141,8 @@ CFLAGS += -Wall -Wstrict-prototypes + # result of any casted expression causes a warning. + CFLAGS += -Wno-unused-value + ++CFLAGS += ${EXTRA_CFLAGS} ++ + $(call cc-option-add,HOSTCFLAGS,HOSTCC,-Wdeclaration-after-statement) + $(call cc-option-add,CFLAGS,CC,-Wdeclaration-after-statement) + $(call cc-option-add,CFLAGS,CC,-Wno-unused-but-set-variable) diff --git a/sysutils/xentools41/patches/patch-firmware_hvmloader_Makefile b/sysutils/xentools41/patches/patch-firmware_hvmloader_Makefile new file mode 100644 index 00000000000..3c0d5803166 --- /dev/null +++ b/sysutils/xentools41/patches/patch-firmware_hvmloader_Makefile @@ -0,0 +1,13 @@ +$NetBSD: patch-firmware_hvmloader_Makefile,v 1.1 2013/04/11 19:57:53 joerg Exp $ + +--- firmware/hvmloader/Makefile.orig 2013-03-25 19:35:30.000000000 +0000 ++++ firmware/hvmloader/Makefile +@@ -26,7 +26,7 @@ SUBDIRS := acpi + # The HVM loader is started in 32-bit mode at the address below: + LOADADDR = 0x100000 + +-CFLAGS += $(CFLAGS_include) -I. ++CFLAGS += $(CFLAGS_include) -I. $(EXTRA_CFLAGS) + + SRCS = hvmloader.c mp_tables.c util.c smbios.c + SRCS += 32bitbios_support.c smp.c cacheattr.c xenbus.c diff --git a/sysutils/xentools41/patches/patch-libcx_xc__dom__boot.c b/sysutils/xentools41/patches/patch-libcx_xc__dom__boot.c new file mode 100644 index 00000000000..a117a554f79 --- /dev/null +++ b/sysutils/xentools41/patches/patch-libcx_xc__dom__boot.c @@ -0,0 +1,13 @@ +$NetBSD: patch-libcx_xc__dom__boot.c,v 1.1 2013/04/11 19:57:53 joerg Exp $ + +--- libxc/xc_dom_boot.c.orig 2013-03-25 10:12:30.000000000 +0000 ++++ libxc/xc_dom_boot.c +@@ -265,7 +265,7 @@ int xc_dom_boot_image(struct xc_dom_imag + return rc; + + /* let the vm run */ +- memset(ctxt, 0, sizeof(ctxt)); ++ memset(ctxt, 0, sizeof(*ctxt)); + if ( (rc = dom->arch_hooks->vcpu(dom, ctxt)) != 0 ) + return rc; + xc_dom_unmap_all(dom); diff --git a/sysutils/xentools41/patches/patch-xenstat_libxenstat_Makefile b/sysutils/xentools41/patches/patch-xenstat_libxenstat_Makefile new file mode 100644 index 00000000000..3a438ef3676 --- /dev/null +++ b/sysutils/xentools41/patches/patch-xenstat_libxenstat_Makefile @@ -0,0 +1,21 @@ +$NetBSD: patch-xenstat_libxenstat_Makefile,v 1.1 2013/04/11 19:57:53 joerg Exp $ + +--- xenstat/libxenstat/Makefile.orig 2013-03-25 19:37:42.000000000 +0000 ++++ xenstat/libxenstat/Makefile +@@ -57,13 +57,13 @@ $(SHLIB): $(OBJECTS-y) + $(OBJECTS-y) $(LDLIBS-y) + + src/xenstat.o: src/xenstat.c src/xenstat.h src/xenstat_priv.h +- $(CC) $(CFLAGS) $(WARN_FLAGS) -c -o $@ $< ++ $(CC) $(WARN_FLAGS) $(CFLAGS) -c -o $@ $< + + src/xenstat_linux.o: src/xenstat_linux.c src/xenstat_priv.h +- $(CC) $(CFLAGS) $(WARN_FLAGS) -c -o $@ $< ++ $(CC) $(WARN_FLAGS) $(CFLAGS) -c -o $@ $< + + src/xenstat_solaris.o: src/xenstat_solaris.c src/xenstat_priv.h +- $(CC) $(CFLAGS) $(WARN_FLAGS) -c -o $@ $< ++ $(CC) $(WARN_FLAGS) $(CFLAGS) -c -o $@ $< + + src/libxenstat.so.$(MAJOR): $(LIB) + $(MAKE_LINK) $(<F) $@ |