summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2015-03-18 15:05:51 +0000
committerjoerg <joerg@pkgsrc.org>2015-03-18 15:05:51 +0000
commit94246dba8a7f5ec406bf820665e1910af93ee13c (patch)
tree673facf76650d0ec8896c9f8d4d62f4c05518fef /sysutils
parent3b8e73d691fb54443a5e1b827b3e06c2e229cbc8 (diff)
downloadpkgsrc-94246dba8a7f5ec406bf820665e1910af93ee13c.tar.gz
Fix build with Clang.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/xenkernel42/Makefile5
-rw-r--r--sysutils/xenkernel42/distinfo3
-rw-r--r--sysutils/xenkernel42/patches/patch-xen_include_asm-x86_atomic.h30
3 files changed, 35 insertions, 3 deletions
diff --git a/sysutils/xenkernel42/Makefile b/sysutils/xenkernel42/Makefile
index e3bfeb2e872..52199e08714 100644
--- a/sysutils/xenkernel42/Makefile
+++ b/sysutils/xenkernel42/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2015/03/10 19:50:15 spz Exp $
+# $NetBSD: Makefile,v 1.14 2015/03/18 15:05:51 joerg Exp $
VERSION= 4.2.5
DISTNAME= xen-${VERSION}
@@ -33,7 +33,8 @@ MESSAGE_SUBST+= XENKERNELDIR=${XENKERNELDIR}
.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=unused-function -Wno-error=unused-const-variable
+ -Wno-error=unused-function -Wno-error=unused-const-variable \
+ -Wno-error=pointer-bool-conversion
.endif
MAKE_ENV+= EXTRA_CFLAGS=${EXTRA_CFLAGS:Q}
diff --git a/sysutils/xenkernel42/distinfo b/sysutils/xenkernel42/distinfo
index 93c857caa3f..5358f4749cb 100644
--- a/sysutils/xenkernel42/distinfo
+++ b/sysutils/xenkernel42/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.11 2015/03/10 19:50:15 spz Exp $
+$NetBSD: distinfo,v 1.12 2015/03/18 15:05:51 joerg Exp $
SHA1 (xen-4.2.5.tar.gz) = f42741e4ec174495ace70c4b17a6b9b0e60e798a
RMD160 (xen-4.2.5.tar.gz) = 7d4f7f1b32ee541d341a756b1f8da02816438d19
@@ -19,6 +19,7 @@ SHA1 (patch-xen_arch_x86_mm_shadow_common.c) = 89dce860cc6aef7d0ec31f3137616b592
SHA1 (patch-xen_arch_x86_x86_emulate_x86_emulate.c) = 8b906e762c8f94a670398b4e033d50a2fb012f0a
SHA1 (patch-xen_common_spinlock.c) = 06f06b5e9b098262ebaa8af0be4837005fb5b8b4
SHA1 (patch-xen_include_asm-arm_spinlock.h) = fe2e35a5ebec4c551df5d1680c93e6ad19348d93
+SHA1 (patch-xen_include_asm-x86_atomic.h) = d406c6071ea3823c25113a801dd77ff32146d162
SHA1 (patch-xen_include_asm-x86_spinlock.h) = fbaaf264e9aa4857635a81b63c4a77cba4bf560f
SHA1 (patch-xen_include_xen_lib.h) = 36dcaf3874a1b1214babc45d7e19fe3b556c1044
SHA1 (patch-xen_include_xen_spinlock.h) = 8e06de55c9b4bfc360e0b8ac5a605adedab8eb8f
diff --git a/sysutils/xenkernel42/patches/patch-xen_include_asm-x86_atomic.h b/sysutils/xenkernel42/patches/patch-xen_include_asm-x86_atomic.h
new file mode 100644
index 00000000000..c5277b8f9c6
--- /dev/null
+++ b/sysutils/xenkernel42/patches/patch-xen_include_asm-x86_atomic.h
@@ -0,0 +1,30 @@
+$NetBSD: patch-xen_include_asm-x86_atomic.h,v 1.1 2015/03/18 15:05:51 joerg Exp $
+
+read_atomic() is used in the condition part of while() loops, so don't
+use break here.
+
+--- xen/include/asm-x86/atomic.h.orig 2015-03-17 23:41:49.000000000 +0000
++++ xen/include/asm-x86/atomic.h
+@@ -46,12 +46,16 @@ void __bad_atomic_size(void);
+
+ #define read_atomic(p) ({ \
+ typeof(*p) __x; \
+- switch ( sizeof(*p) ) { \
+- case 1: __x = (typeof(*p))read_u8_atomic((uint8_t *)p); break; \
+- case 2: __x = (typeof(*p))read_u16_atomic((uint16_t *)p); break; \
+- case 4: __x = (typeof(*p))read_u32_atomic((uint32_t *)p); break; \
+- case 8: __x = (typeof(*p))read_u64_atomic((uint64_t *)p); break; \
+- default: __x = 0; __bad_atomic_size(); break; \
++ if ( sizeof(*p) == 1 ) \
++ __x = (typeof(*p))read_u8_atomic((uint8_t *)p); \
++ else if ( sizeof(*p) == 2 ) \
++ __x = (typeof(*p))read_u16_atomic((uint16_t *)p); \
++ else if ( sizeof(*p) == 4 ) \
++ __x = (typeof(*p))read_u32_atomic((uint32_t *)p); \
++ else if ( sizeof(*p) == 8 ) \
++ __x = (typeof(*p))read_u64_atomic((uint64_t *)p); \
++ else { \
++ __x = 0; __bad_atomic_size(); \
+ } \
+ __x; \
+ })