aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authorroyger <royger@FreeBSD.org>2016-03-31 23:32:49 +0800
committerroyger <royger@FreeBSD.org>2016-03-31 23:32:49 +0800
commit5dc1142247bb52fffb5a556739422ccd0bbeac96 (patch)
treecd98eb4786c3bc495a5eaad6dbc1831cfdb7a983 /sysutils
parent47384b7b765d30db8a3f19efbc728da56db408c1 (diff)
downloadfreebsd-ports-gnome-5dc1142247bb52fffb5a556739422ccd0bbeac96.tar.gz
freebsd-ports-gnome-5dc1142247bb52fffb5a556739422ccd0bbeac96.tar.zst
freebsd-ports-gnome-5dc1142247bb52fffb5a556739422ccd0bbeac96.zip
xen-tools: extract seabios, build with clang
Submitted by: bapt Minor fixes by: royger Approved by: bapt
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/xen-tools/Makefile24
-rw-r--r--sysutils/xen-tools/distinfo2
-rw-r--r--sysutils/xen-tools/files/0001-build-fix-.text-section-address-alignment.patch71
-rw-r--r--sysutils/xen-tools/files/patch-tools_firmware_seabios-dir_scripts_buildversion.sh11
-rw-r--r--sysutils/xen-tools/files/patch-tools_libxc_xc__dom__bzimageloader.c11
-rw-r--r--sysutils/xen-tools/files/patch-tools_misc_xenpm.c13
6 files changed, 33 insertions, 99 deletions
diff --git a/sysutils/xen-tools/Makefile b/sysutils/xen-tools/Makefile
index 6bf1ed7cb5a8..7a8717667a8e 100644
--- a/sysutils/xen-tools/Makefile
+++ b/sysutils/xen-tools/Makefile
@@ -2,10 +2,9 @@
PORTNAME= xen
PORTVERSION= 4.5.2
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= sysutils emulators
-MASTER_SITES= http://bits.xensource.com/oss-xen/release/${PORTVERSION}/ \
- http://code.coreboot.org/p/seabios/downloads/get/:seabios
+MASTER_SITES= http://bits.xensource.com/oss-xen/release/${PORTVERSION}/
PKGNAMESUFFIX= -tools
MAINTAINER= royger@FreeBSD.org
@@ -17,27 +16,25 @@ LICENSE_COMB= multi
LIB_DEPENDS= libyajl.so:${PORTSDIR}/devel/yajl \
liblzo2.so:${PORTSDIR}/archivers/lzo2 \
libpixman-1.so:${PORTSDIR}/x11/pixman
-BUILD_DEPENDS= dev86>0:${PORTSDIR}/devel/dev86
+BUILD_DEPENDS= dev86>0:${PORTSDIR}/devel/dev86 \
+ seabios>0:${PORTSDIR}/misc/seabios
OPTIONS_DEFINE= DOCS
ONLY_FOR_ARCHS= amd64
ONLY_FOR_ARCHS_REASON= "not yet ported to anything other than amd64"
-SEABIOSVERSION= 1.8.2
-DISTFILES+= ${DISTNAME}.tar.gz \
- seabios-${SEABIOSVERSION}.tar.gz:seabios
-
WRKSRC= ${WRKDIR}/xen-${PORTVERSION}
-USES= cpe gmake libtool perl5 pkgconfig python shebangfix
+USES= cpe gmake libtool perl5 pkgconfig python shebangfix localbase
USE_GNOME= glib20
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
CONFIGURE_ENV= HOSTCC="${CC}" CC="${CC}" \
ac_cv_path_BASH=${TRUE} \
ac_cv_path_XGETTEXT=${TRUE}
-MAKE_ARGS= HOSTCC="${CC}" CC="${CC}" GCC="${GCC}" cc="${GCC}"
+MAKE_ARGS= HOSTCC="${CC}" CC="${CC}" GCC="${CC}" cc="${GCC}" \
+ HOSTCFLAGS="${CFLAGS}" SEABIOS_PATH="${LOCALBASE}/share/seabios/bios.bin"
QEMU_ARGS= --disable-gtk \
--disable-smartcard-nss \
--disable-sdl \
@@ -47,15 +44,15 @@ QEMU_ARGS= --disable-gtk \
--disable-tools \
--disable-curl \
--cxx=c++
+CFLAGS= -Wno-ignored-attributes -Qunused-arguments -Wno-header-guard \
+ -Wno-tautological-compare -Wno-format-extra-args -w
EXTRA_PATCHES= ${FILESDIR}/0002-libxc-fix-xc_dom_load_elf_symtab.patch:-p1 \
- ${FILESDIR}/0001-build-fix-.text-section-address-alignment.patch:-p1 \
${FILESDIR}/xsa160-4.6.patch:-p1
CONFIGURE_ARGS+= --with-extra-qemuu-configure-args="${QEMU_ARGS}"
SHEBANG_FILES= tools/misc/xencov_split \
tools/misc/xen-ringwatch
-USE_GCC= yes
ALL_TARGET= tools docs
INSTALL_TARGET= install-tools install-docs
@@ -65,9 +62,6 @@ INSTALL_TARGET= install-tools install-docs
IGNORE= only supported on FreeBSD
.endif
-post-extract:
- ${MV} ${WRKDIR}/seabios-${SEABIOSVERSION} ${WRKSRC}/tools/firmware/seabios-dir
-
post-patch:
@${REINPLACE_CMD} "s,x86_64,amd64,g" ${WRKSRC}/tools/configure
@${REINPLACE_CMD} -e "s,/var/lib,/var/db,g" \
diff --git a/sysutils/xen-tools/distinfo b/sysutils/xen-tools/distinfo
index 42babf2c8556..bbc57b46fa18 100644
--- a/sysutils/xen-tools/distinfo
+++ b/sysutils/xen-tools/distinfo
@@ -1,4 +1,2 @@
SHA256 (xen-4.5.2.tar.gz) = 4c9e5dac4eea484974e9f76da2756c8e0973b4e884d28d37e955df9ebf00e7e8
SIZE (xen-4.5.2.tar.gz) = 18416220
-SHA256 (seabios-1.8.2.tar.gz) = f59479307fdae840de398b75aacb2333c8eba24a5964d68c77e32ca6c987ee61
-SIZE (seabios-1.8.2.tar.gz) = 538497
diff --git a/sysutils/xen-tools/files/0001-build-fix-.text-section-address-alignment.patch b/sysutils/xen-tools/files/0001-build-fix-.text-section-address-alignment.patch
deleted file mode 100644
index 7bd4bf4ad5eb..000000000000
--- a/sysutils/xen-tools/files/0001-build-fix-.text-section-address-alignment.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From 70a912f04dec2b556f37a60d1f596fcedb13f8a8 Mon Sep 17 00:00:00 2001
-From: Kevin O'Connor <kevin@koconnor.net>
-Date: Wed, 24 Feb 2016 11:45:55 +0100
-Subject: [PATCH] build: fix .text section address alignment
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Some linkers verify that sections have a start address that is aligned
-with the minimum alignment of that section. Add extra padding to the
-".text" section to ensure it is always aligned with the maximum
-alignment of any section placed in ".text".
-
-Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
-Reported by: Ed Maste <emaste@FreeBSD.org>
----
- scripts/layoutrom.py | 14 ++++++++++----
- 1 file changed, 10 insertions(+), 4 deletions(-)
-
-diff --git a/tools/firmware/seabios-dir/scripts/layoutrom.py b/tools/firmware/seabios-dir/scripts/layoutrom.py
-index dd770fe..c7e406c 100755
---- a/tools/firmware/seabios-dir/scripts/layoutrom.py
-+++ b/tools/firmware/seabios-dir/scripts/layoutrom.py
-@@ -34,18 +34,22 @@ COMMONTRAILER = """
- # Determine section locations
- ######################################################################
-
--# Align 'pos' to 'alignbytes' offset
-+# Align 'pos' up to 'alignbytes' offset
- def alignpos(pos, alignbytes):
- mask = alignbytes - 1
- return (pos + mask) & ~mask
-
-+# Align 'pos' down to 'alignbytes' offset
-+def aligndown(pos, alignbytes):
-+ mask = alignbytes - 1
-+ return pos & ~mask
-+
- # Determine the final addresses for a list of sections that end at an
- # address.
- def setSectionsStart(sections, endaddr, minalign=1, segoffset=0):
- totspace = 0
- for section in sections:
-- if section.align > minalign:
-- minalign = section.align
-+ minalign = max(minalign, section.align)
- totspace = alignpos(totspace, section.align) + section.size
- startaddr = int((endaddr - totspace) / minalign) * minalign
- curaddr = startaddr
-@@ -267,7 +271,7 @@ def doLayout(sections, config, genreloc):
- final_sec32low_end = BUILD_LOWRAM_END
- zonelow_base = final_sec32low_end - 64*1024
- relocdelta = final_sec32low_end - sec32low_end
-- li.sec32low_start, li.sec32low_align = setSectionsStart(
-+ li.sec32low_start, sec32low_align = setSectionsStart(
- sections32low, sec32low_end, 16
- , segoffset=zonelow_base - relocdelta)
- li.sec32low_end = sec32low_end
-@@ -399,6 +403,8 @@ def writeLinkerScripts(li, out16, out32seg, out32flat):
- filesections32flat = getSectionsFileid(li.sections, '32flat')
- out = outXRefs([], exportsyms=li.varlowsyms
- , forcedelta=li.final_sec32low_start-li.sec32low_start)
-+ sec32all_align = max([section.align for section in li.sections])
-+ sec32all_start = aligndown(sec32all_start, sec32all_align)
- out += outXRefs(filesections32flat, exportsyms=[li.entrysym]) + """
- _reloc_min_align = 0x%x ;
- zonefseg_start = 0x%x ;
---
-2.5.4 (Apple Git-61)
-
diff --git a/sysutils/xen-tools/files/patch-tools_firmware_seabios-dir_scripts_buildversion.sh b/sysutils/xen-tools/files/patch-tools_firmware_seabios-dir_scripts_buildversion.sh
deleted file mode 100644
index ff55a744832c..000000000000
--- a/sysutils/xen-tools/files/patch-tools_firmware_seabios-dir_scripts_buildversion.sh
+++ /dev/null
@@ -1,11 +0,0 @@
---- tools/firmware/seabios-dir/scripts/buildversion.sh.orig 2015-03-13 09:02:17 UTC
-+++ tools/firmware/seabios-dir/scripts/buildversion.sh
-@@ -12,7 +12,7 @@ if [ -z "$BUILD_VERSION" ]; then
- else
- VERSION="?"
- fi
-- VERSION="${VERSION}-`date +"%Y%m%d_%H%M%S"`-`hostname`"
-+ VERSION="${VERSION}"
- else
- VERSION="$BUILD_VERSION"
- fi
diff --git a/sysutils/xen-tools/files/patch-tools_libxc_xc__dom__bzimageloader.c b/sysutils/xen-tools/files/patch-tools_libxc_xc__dom__bzimageloader.c
new file mode 100644
index 000000000000..b40552e00a4c
--- /dev/null
+++ b/sysutils/xen-tools/files/patch-tools_libxc_xc__dom__bzimageloader.c
@@ -0,0 +1,11 @@
+--- tools/libxc/xc_dom_bzimageloader.c.orig 2015-11-03 09:11:18 UTC
++++ tools/libxc/xc_dom_bzimageloader.c
+@@ -469,7 +469,7 @@ static int xc_try_lzo1x_decode(
+
+ for ( *size = 0; ; )
+ {
+- lzo_uint src_len, dst_len, out_len;
++ lzo_uint src_len, dst_len, out_len = 0;
+ unsigned char *tmp_buf;
+
+ msg = "Short input";
diff --git a/sysutils/xen-tools/files/patch-tools_misc_xenpm.c b/sysutils/xen-tools/files/patch-tools_misc_xenpm.c
new file mode 100644
index 000000000000..15c33bd5b9dc
--- /dev/null
+++ b/sysutils/xen-tools/files/patch-tools_misc_xenpm.c
@@ -0,0 +1,13 @@
+--- tools/misc/xenpm.c.orig 2015-11-03 09:11:18 UTC
++++ tools/misc/xenpm.c
+@@ -97,8 +97,8 @@ static void parse_cpuid_and_int(int argc
+
+ if ( argc == 0 || sscanf(argv[argc > 1], "%d", val) != 1 )
+ {
+- fprintf(stderr, argc ? "Invalid %s '%s'\n" : "Missing %s\n",
+- what, argv[argc > 1]);
++ fprintf(stderr, argc ? "Invalid %s '%s'\n" : "Missing %s\n%s",
++ what, argc ? argv[argc > 1] : "");
+ exit(EINVAL);
+ }
+ }