summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--ChangeLog1
-rw-r--r--PKGBUILD8
-rw-r--r--nopic.patch51
4 files changed, 60 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6d4006d95b47..b56a09308339 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
# Generated by mksrcinfo v8
-# Sat Sep 30 21:05:56 UTC 2017
+# Sat Sep 30 21:13:47 UTC 2017
pkgbase = xen
pkgdesc = Virtual Machine Hypervisor & Tools
pkgver = 4.9.0
@@ -60,6 +60,7 @@ pkgbase = xen
source = https://xenbits.xen.org/xsa/xsa235-4.9.patch
source = https://xenbits.xen.org/xsa/xsa245/0001-xen-page_alloc-Cover-memory-unreserved-after-boot-in.patch
source = https://xenbits.xen.org/xsa/xsa245/0002-xen-arm-Correctly-report-the-memory-region-in-the-du.patch
+ source = nopic.patch
source = grub-mkconfig-helper
source = efi-xen.cfg
source = grub.conf
@@ -80,6 +81,7 @@ pkgbase = xen
sha256sums = d8f012734fbf6019c1ff864744e308c41dfb9c7804ca3be2771c2c972cdf4bd5
sha256sums = 526f9e1b127fbb316762ce8e8f4563bc9de0c55a1db581456a3017d570d35bdd
sha256sums = 7164010112fcccd9cd88e72ace2eeabdb364dd6f4d05c434686267d18067f420
+ sha256sums = b270ce2dc383cf350ef00dae47064056cad382d8f3db7985a6d55207030c53de
sha256sums = 06c9f6140f7ef4ccfc4b1a7d9732a673313e269733180f53afcd9e43bf6c26bb
sha256sums = ceaff798a92a7aef1465a0a0b27b1817aedd2c857332b456aaa6dd78dc72438f
sha256sums = 3f0af16958c3e057b9baa5afc47050d9adf7dd553274dd97ae4f35938fefb568
diff --git a/ChangeLog b/ChangeLog
index 38fdb87123c4..e7e6a0ff2bea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
2017-09-30 Janne Heß
* 4.9.0-2
Add spice-glib dependency
+ Fix build with PIC
Apply XSA patches: 226 227 228 229 230 231 232 233 234 235
2017-07-20 Janne Heß
diff --git a/PKGBUILD b/PKGBUILD
index 5ab8917ec69e..d07370d06a57 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -113,6 +113,7 @@ source=(
'https://xenbits.xen.org/xsa/xsa245/0002-xen-arm-Correctly-report-the-memory-region-in-the-du.patch'
# Files
+ 'nopic.patch'
'grub-mkconfig-helper'
'efi-xen.cfg'
'grub.conf'
@@ -154,6 +155,7 @@ sha256sums=(
'7164010112fcccd9cd88e72ace2eeabdb364dd6f4d05c434686267d18067f420'
# Last checked: XSA-245
# PKGBUILD files
+ 'b270ce2dc383cf350ef00dae47064056cad382d8f3db7985a6d55207030c53de'
'06c9f6140f7ef4ccfc4b1a7d9732a673313e269733180f53afcd9e43bf6c26bb'
'ceaff798a92a7aef1465a0a0b27b1817aedd2c857332b456aaa6dd78dc72438f'
'3f0af16958c3e057b9baa5afc47050d9adf7dd553274dd97ae4f35938fefb568'
@@ -225,6 +227,9 @@ prepare() {
#patch -Np1 -i "${srcdir}/xsa211-qemuu-4.8.patch"
popd >/dev/null
+ # Patch build with PIC
+ patch -Np1 -i "${srcdir}/nopic.patch"
+
# Patch EFI binary build with mingw
msg2 'Patching EFI build...'
sed -i.bak '/ EFI_LD/s/LD/LD_EFI/' xen/arch/x86/Makefile
@@ -283,9 +288,6 @@ build() {
msg2 'Building Xen...'
# NO_WERROR is required for iPXE, as the sources are not extracted before the build
# and the Werror cannot be patched out
- make LANG=C PYTHON=python2 NO_WERROR=1 dist || :
- # This is an honestly ugly hack. If someone finds out why the build fails the first time, please contact me.
- # It's ugly but it makes the package build
make LANG=C PYTHON=python2 NO_WERROR=1 dist
}
diff --git a/nopic.patch b/nopic.patch
new file mode 100644
index 000000000000..2d302f535eec
--- /dev/null
+++ b/nopic.patch
@@ -0,0 +1,51 @@
+From 672949d6c61d9cba01c5b414eed9d522082f04d3 Mon Sep 17 00:00:00 2001
+From: Olaf Hering <olaf@aepfle.de>
+Date: Mon, 26 Jun 2017 14:55:07 +0200
+Subject: [PATCH] rombios: prevent building with PIC/PIE
+
+If the default compiler silently defaults to to -fPIC/-fPIE building
+rombios fails:
+
+ ld -melf_i386 -s -r 32bitbios.o tcgbios/tcgbiosext.o util.o pmm.o -o 32bitbios_all.o
+ There are undefined symbols in the BIOS:
+ U _GLOBAL_OFFSET_TABLE_
+ make[10]: *** [Makefile:26: 32bitbios_all.o] Error 11
+
+Prevent the failure by enforcing non-PIC/PIE mode.
+
+Signed-off-by: Olaf Hering <olaf@aepfle.de>
+Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
+---
+ tools/firmware/rombios/32bit/Makefile | 2 ++
+ tools/firmware/rombios/32bit/tcgbios/Makefile | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/tools/firmware/rombios/32bit/Makefile b/tools/firmware/rombios/32bit/Makefile
+index b0583c9..28c1544 100644
+--- a/tools/firmware/rombios/32bit/Makefile
++++ b/tools/firmware/rombios/32bit/Makefile
+@@ -4,6 +4,8 @@ include $(XEN_ROOT)/tools/firmware/Rules.mk
+ TARGET = 32bitbios_flat.h
+
+ CFLAGS += $(CFLAGS_xeninclude) -I.. -I../../../libacpi
++$(call cc-option-add,CFLAGS,CC,-fno-pic)
++$(call cc-option-add,CFLAGS,CC,-fno-PIE)
+
+ SUBDIRS = tcgbios
+
+diff --git a/tools/firmware/rombios/32bit/tcgbios/Makefile b/tools/firmware/rombios/32bit/tcgbios/Makefile
+index f87d130..5cff4ef 100644
+--- a/tools/firmware/rombios/32bit/tcgbios/Makefile
++++ b/tools/firmware/rombios/32bit/tcgbios/Makefile
+@@ -4,6 +4,8 @@ include $(XEN_ROOT)/tools/firmware/Rules.mk
+ TARGET = tcgbiosext.o
+
+ CFLAGS += $(CFLAGS_xeninclude) -I.. -I../.. -I../../../../libacpi
++$(call cc-option-add,CFLAGS,CC,-fno-pic)
++$(call cc-option-add,CFLAGS,CC,-fno-PIE)
+
+ .PHONY: all
+ all: $(TARGET)
+--
+2.1.4
+