summaryrefslogtreecommitdiff
path: root/sysutils/xenkernel41
diff options
context:
space:
mode:
authorjoerg <joerg>2013-04-11 19:57:51 +0000
committerjoerg <joerg>2013-04-11 19:57:51 +0000
commit5dd7e297a4a285c9d5a5d8467aaa90f85eb7abc4 (patch)
treea48bd646c2a7b3e6340b8037d55ab035cbba1f29 /sysutils/xenkernel41
parent73c07034e8892725f26b05c708bceaedcba74c1d (diff)
downloadpkgsrc-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.
Diffstat (limited to 'sysutils/xenkernel41')
-rw-r--r--sysutils/xenkernel41/Makefile11
-rw-r--r--sysutils/xenkernel41/distinfo7
-rw-r--r--sysutils/xenkernel41/patches/patch-Config.mk13
-rw-r--r--sysutils/xenkernel41/patches/patch-xen_Makefile13
-rw-r--r--sysutils/xenkernel41/patches/patch-xen_arch_x86_Rules.mk12
-rw-r--r--sysutils/xenkernel41/patches/patch-xen_arch_x86_cpu_mcheck_vmce.c31
-rw-r--r--sysutils/xenkernel41/patches/patch-xen_arch_x86_time.c35
7 files changed, 120 insertions, 2 deletions
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