pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/sysutils Allow building Xen infrastructure with Clang....
details: https://anonhg.NetBSD.org/pkgsrc/rev/435c014d7972
branches: trunk
changeset: 617242:435c014d7972
user: joerg <joerg%pkgsrc.org@localhost>
date: Thu Apr 11 19:57:51 2013 +0000
description:
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:
sysutils/xenkernel3/Makefile | 22 ++-
sysutils/xenkernel3/distinfo | 6 +-
sysutils/xenkernel3/patches/patch-cw | 13 +-
sysutils/xenkernel3/patches/patch-xen_arch_x86_hvm_io.c | 13 +
sysutils/xenkernel3/patches/patch-xen_arch_x86_string.c | 26 +++
sysutils/xenkernel33/Makefile | 14 +-
sysutils/xenkernel33/distinfo | 5 +-
sysutils/xenkernel33/patches/patch-Config.mk | 13 +
sysutils/xenkernel33/patches/patch-xen_Makefile | 13 +
sysutils/xenkernel33/patches/patch-xen_arch_x86_Rules.mk | 12 +
sysutils/xenkernel41/Makefile | 11 +-
sysutils/xenkernel41/distinfo | 7 +-
sysutils/xenkernel41/patches/patch-Config.mk | 13 +
sysutils/xenkernel41/patches/patch-xen_Makefile | 13 +
sysutils/xenkernel41/patches/patch-xen_arch_x86_Rules.mk | 12 +
sysutils/xenkernel41/patches/patch-xen_arch_x86_cpu_mcheck_vmce.c | 31 ++++
sysutils/xenkernel41/patches/patch-xen_arch_x86_time.c | 35 +++++
sysutils/xentools3-hvm/Makefile | 12 +-
sysutils/xentools3-hvm/distinfo | 3 +-
sysutils/xentools3-hvm/patches/patch-.._patch-Config.mk | 26 +++
sysutils/xentools3/Makefile | 14 +-
sysutils/xentools3/distinfo | 7 +-
sysutils/xentools3/patches/patch-.._patch-Config.mk | 17 ++-
sysutils/xentools3/patches/patch-cg | 21 ++-
sysutils/xentools3/patches/patch-libxc_xc__dom__x86.c | 22 +++
sysutils/xentools33/Makefile | 12 +-
sysutils/xentools33/distinfo | 6 +-
sysutils/xentools33/patches/patch-ab | 22 ++-
sysutils/xentools33/patches/patch-blktap_drivers_block-qcow.c | 14 ++
sysutils/xentools33/patches/patch-ioemu_block-vvfat.c | 13 +
sysutils/xentools41/Makefile | 15 +-
sysutils/xentools41/distinfo | 11 +-
sysutils/xentools41/patches/patch-.._.._ipxe_src_arch_i386_include_librm.h | 16 ++
sysutils/xentools41/patches/patch-.._.._ipxe_src_core_settings.c | 34 ++++
sysutils/xentools41/patches/patch-.._.._ipxe_src_net_tls.c | 69 ++++++++++
sysutils/xentools41/patches/patch-.._Config.mk | 22 +++
sysutils/xentools41/patches/patch-firmware_hvmloader_Makefile | 13 +
sysutils/xentools41/patches/patch-libcx_xc__dom__boot.c | 13 +
sysutils/xentools41/patches/patch-xenstat_libxenstat_Makefile | 21 +++
39 files changed, 624 insertions(+), 38 deletions(-)
diffs (truncated from 1084 to 300 lines):
diff -r 47c40b604de0 -r 435c014d7972 sysutils/xenkernel3/Makefile
--- a/sysutils/xenkernel3/Makefile Thu Apr 11 17:26:49 2013 +0000
+++ b/sysutils/xenkernel3/Makefile Thu Apr 11 19:57:51 2013 +0000
@@ -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 @@
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 -r 47c40b604de0 -r 435c014d7972 sysutils/xenkernel3/distinfo
--- a/sysutils/xenkernel3/distinfo Thu Apr 11 17:26:49 2013 +0000
+++ b/sysutils/xenkernel3/distinfo Thu Apr 11 19:57:51 2013 +0000
@@ -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-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 -r 47c40b604de0 -r 435c014d7972 sysutils/xenkernel3/patches/patch-cw
--- a/sysutils/xenkernel3/patches/patch-cw Thu Apr 11 17:26:49 2013 +0000
+++ b/sysutils/xenkernel3/patches/patch-cw Thu Apr 11 19:57:51 2013 +0000
@@ -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 @@
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 -r 47c40b604de0 -r 435c014d7972 sysutils/xenkernel3/patches/patch-xen_arch_x86_hvm_io.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xenkernel3/patches/patch-xen_arch_x86_hvm_io.c Thu Apr 11 19:57:51 2013 +0000
@@ -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 -r 47c40b604de0 -r 435c014d7972 sysutils/xenkernel3/patches/patch-xen_arch_x86_string.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xenkernel3/patches/patch-xen_arch_x86_string.c Thu Apr 11 19:57:51 2013 +0000
@@ -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 -r 47c40b604de0 -r 435c014d7972 sysutils/xenkernel33/Makefile
--- a/sysutils/xenkernel33/Makefile Thu Apr 11 17:26:49 2013 +0000
+++ b/sysutils/xenkernel33/Makefile Thu Apr 11 19:57:51 2013 +0000
@@ -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 @@
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 -r 47c40b604de0 -r 435c014d7972 sysutils/xenkernel33/distinfo
--- a/sysutils/xenkernel33/distinfo Thu Apr 11 17:26:49 2013 +0000
+++ b/sysutils/xenkernel33/distinfo Thu Apr 11 19:57:51 2013 +0000
@@ -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-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 -r 47c40b604de0 -r 435c014d7972 sysutils/xenkernel33/patches/patch-Config.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xenkernel33/patches/patch-Config.mk Thu Apr 11 19:57:51 2013 +0000
@@ -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 -r 47c40b604de0 -r 435c014d7972 sysutils/xenkernel33/patches/patch-xen_Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xenkernel33/patches/patch-xen_Makefile Thu Apr 11 19:57:51 2013 +0000
@@ -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 -r 47c40b604de0 -r 435c014d7972 sysutils/xenkernel33/patches/patch-xen_arch_x86_Rules.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xenkernel33/patches/patch-xen_arch_x86_Rules.mk Thu Apr 11 19:57:51 2013 +0000
@@ -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 -r 47c40b604de0 -r 435c014d7972 sysutils/xenkernel41/Makefile
--- a/sysutils/xenkernel41/Makefile Thu Apr 11 17:26:49 2013 +0000
+++ b/sysutils/xenkernel41/Makefile Thu Apr 11 19:57:51 2013 +0000
@@ -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 @@
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 -r 47c40b604de0 -r 435c014d7972 sysutils/xenkernel41/distinfo
--- a/sysutils/xenkernel41/distinfo Thu Apr 11 17:26:49 2013 +0000
+++ b/sysutils/xenkernel41/distinfo Thu Apr 11 19:57:51 2013 +0000
@@ -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 -r 47c40b604de0 -r 435c014d7972 sysutils/xenkernel41/patches/patch-Config.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xenkernel41/patches/patch-Config.mk Thu Apr 11 19:57:51 2013 +0000
@@ -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
Home |
Main Index |
Thread Index |
Old Index