summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation/xen-tools/files')
-rw-r--r--app-emulation/xen-tools/files/gentoo-patches.conf44
-rw-r--r--app-emulation/xen-tools/files/xen-tools-4.15.1-brotli-gcc11.patch33
-rw-r--r--app-emulation/xen-tools/files/xen-tools-4.15.1-edk2-python3.9.patch26
-rw-r--r--app-emulation/xen-tools/files/xen-tools-4.15.1-ocaml-4.12.patch101
4 files changed, 171 insertions, 33 deletions
diff --git a/app-emulation/xen-tools/files/gentoo-patches.conf b/app-emulation/xen-tools/files/gentoo-patches.conf
index 3651d99a68a..d6fce26a06c 100644
--- a/app-emulation/xen-tools/files/gentoo-patches.conf
+++ b/app-emulation/xen-tools/files/gentoo-patches.conf
@@ -51,44 +51,23 @@ _gx056=" xen-tools-4.12.2-libxenstat-makefile.patch"
# Fix building with gcc 10, bug #722930
_gx060=" xen-tools-4.13.0-gcc10.patch"
-# xen-tools-4.14.2 patches set
-_gpv_xen_tools_4142_0="
- xen-tools-4.12.0-gcc8.patch
- xen-tools-4.12.0-shim.patch
- xen-tools-4.12.0-unbundle-ipxe.patch
- xen-tools-4.12.2-libxenstat-makefile.patch
- xen-tools-4.14-ar-cc.patch
- xen-tools-4.14-qemu-bridge.patch
- xen-tools-4.15.0-disable-werror.patch
- xen-tools-4.15.0-gcc11.patch
- xen-tools-4.4.1-tinfo.patch
- xen-tools-4.6-increase-stack-size.patch
- xen-tools-4-anti-ovmf-download.patch
- xen-tools-4-qemu-fix-po-collision.patch
-"
-
-# xen-tools-4.14.3 patches set
-_gpv_xen_tools_4143_0="
- xen-tools-4.12.0-gcc8.patch
- xen-tools-4.12.0-shim.patch
- xen-tools-4.12.0-unbundle-ipxe.patch
- xen-tools-4.12.2-libxenstat-makefile.patch
+# xen-tools-4.15.1 patches set
+_gpv_xen_tools_4151_0="
xen-tools-4.14-ar-cc.patch
- xen-tools-4.14-qemu-bridge.patch
xen-tools-4.15.0-disable-werror.patch
+ xen-tools-4.15.0-libxenstat-makefile.patch
+ xen-tools-4.15.0-qemu-bridge.patch
+ xen-tools-4.15.0-unbundle-ipxe.patch
xen-tools-4.4.1-tinfo.patch
- xen-tools-4.6-increase-stack-size.patch
xen-tools-4-anti-ovmf-download.patch
xen-tools-4-qemu-fix-po-collision.patch
"
-# xen-tools-4.15.0 patches set
-_gpv_xen_tools_4150_0="
+# xen-tools-4.15.2 patches set
+_gpv_xen_tools_4152_0="
xen-tools-4.14-ar-cc.patch
xen-tools-4.15.0-disable-werror.patch
- xen-tools-4.15.0-gcc11.patch
xen-tools-4.15.0-libxenstat-makefile.patch
- xen-tools-4.15.0-no-ld-no-pie.patch
xen-tools-4.15.0-qemu-bridge.patch
xen-tools-4.15.0-unbundle-ipxe.patch
xen-tools-4.4.1-tinfo.patch
@@ -96,14 +75,13 @@ _gpv_xen_tools_4150_0="
xen-tools-4-qemu-fix-po-collision.patch
"
-# xen-tools-4.15.1 patches set
-_gpv_xen_tools_4151_0="
+# xen-tools-4.16.0 patches set
+_gpv_xen_tools_4160_0="
xen-tools-4.14-ar-cc.patch
xen-tools-4.15.0-disable-werror.patch
- xen-tools-4.15.0-libxenstat-makefile.patch
- xen-tools-4.15.0-qemu-bridge.patch
xen-tools-4.15.0-unbundle-ipxe.patch
+ xen-tools-4.16.0-qemu-bridge.patch
+ xen-tools-4.16.0-xenstat.patch
xen-tools-4.4.1-tinfo.patch
xen-tools-4-anti-ovmf-download.patch
- xen-tools-4-qemu-fix-po-collision.patch
"
diff --git a/app-emulation/xen-tools/files/xen-tools-4.15.1-brotli-gcc11.patch b/app-emulation/xen-tools/files/xen-tools-4.15.1-brotli-gcc11.patch
new file mode 100644
index 00000000000..c30cb328460
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-4.15.1-brotli-gcc11.patch
@@ -0,0 +1,33 @@
+diff --git a/c/dec/decode.c b/c/dec/decode.c
+index ae5a3d3f..7eee9688 100644
+--- a/c/dec/decode.c
++++ b/c/dec/decode.c
+@@ -2033,8 +2033,10 @@ static BROTLI_NOINLINE BrotliDecoderErrorCode SafeProcessCommands(
+ }
+
+ BrotliDecoderResult BrotliDecoderDecompress(
+- size_t encoded_size, const uint8_t* encoded_buffer, size_t* decoded_size,
+- uint8_t* decoded_buffer) {
++ size_t encoded_size,
++ const uint8_t encoded_buffer[BROTLI_ARRAY_PARAM(encoded_size)],
++ size_t* decoded_size,
++ uint8_t decoded_buffer[BROTLI_ARRAY_PARAM(*decoded_size)]) {
+ BrotliDecoderState s;
+ BrotliDecoderResult result;
+ size_t total_out = 0;
+diff --git a/c/enc/encode.c b/c/enc/encode.c
+index 8d90937b..0c49c641 100644
+--- a/c/enc/encode.c
++++ b/c/enc/encode.c
+@@ -1470,8 +1470,9 @@ static size_t MakeUncompressedStream(
+
+ BROTLI_BOOL BrotliEncoderCompress(
+ int quality, int lgwin, BrotliEncoderMode mode, size_t input_size,
+- const uint8_t* input_buffer, size_t* encoded_size,
+- uint8_t* encoded_buffer) {
++ const uint8_t input_buffer[BROTLI_ARRAY_PARAM(input_size)],
++ size_t* encoded_size,
++ uint8_t encoded_buffer[BROTLI_ARRAY_PARAM(*encoded_size)]) {
+ BrotliEncoderState* s;
+ size_t out_size = *encoded_size;
+ const uint8_t* input_start = input_buffer;
diff --git a/app-emulation/xen-tools/files/xen-tools-4.15.1-edk2-python3.9.patch b/app-emulation/xen-tools/files/xen-tools-4.15.1-edk2-python3.9.patch
new file mode 100644
index 00000000000..a1f8d155434
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-4.15.1-edk2-python3.9.patch
@@ -0,0 +1,26 @@
+diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py
+index ad556710802e..4be7957138a5 100755
+--- a/BaseTools/Source/Python/Common/Misc.py
++++ b/BaseTools/Source/Python/Common/Misc.py
+@@ -1635,7 +1635,7 @@ def __init__(self, PeFile):
+ ByteArray = array.array('B')
+ ByteArray.fromfile(PeObject, 4)
+ # PE signature should be 'PE\0\0'
+- if ByteArray.tostring() != b'PE\0\0':
++ if ByteArray.tolist() != [ord('P'), ord('E'), 0, 0]:
+ self.ErrorInfo = self.FileName + ' has no valid PE signature PE00'
+ return
+
+diff --git a/BaseTools/Source/Python/AutoGen/UniClassObject.py b/BaseTools/Source/Python/AutoGen/UniClassObject.py
+index b2895f7e5c63..883c2356e0ca 100644
+--- a/BaseTools/Source/Python/AutoGen/UniClassObject.py
++++ b/BaseTools/Source/Python/AutoGen/UniClassObject.py
+@@ -152,7 +152,7 @@ def encode(self, input, errors='strict'):
+
+ TheUcs2Codec = Ucs2Codec()
+ def Ucs2Search(name):
+- if name == 'ucs-2':
++ if name in ['ucs-2', 'ucs_2']:
+ return codecs.CodecInfo(
+ name=name,
+ encode=TheUcs2Codec.encode,
diff --git a/app-emulation/xen-tools/files/xen-tools-4.15.1-ocaml-4.12.patch b/app-emulation/xen-tools/files/xen-tools-4.15.1-ocaml-4.12.patch
new file mode 100644
index 00000000000..b06a7f195bf
--- /dev/null
+++ b/app-emulation/xen-tools/files/xen-tools-4.15.1-ocaml-4.12.patch
@@ -0,0 +1,101 @@
+From 2d1a35f1e6c2113a6322fdb758a198608c90e4bd Mon Sep 17 00:00:00 2001
+From: Costin Lupu <costin.lupu@cs.pub.ro>
+Date: Tue, 8 Jun 2021 15:35:29 +0300
+Subject: [PATCH] tools/ocaml: Fix redefinition errors
+
+If PAGE_SIZE is already defined in the system (e.g. in /usr/include/limits.h
+header) then gcc will trigger a redefinition error because of -Werror. This
+patch replaces usage of PAGE_* macros with XC_PAGE_* macros in order to avoid
+confusion between control domain page granularity (PAGE_* definitions) and
+guest domain page granularity (which is what we are dealing with here).
+
+Same issue applies for redefinitions of Val_none and Some_val macros which
+can be already define in the OCaml system headers (e.g.
+/usr/lib/ocaml/caml/mlvalues.h).
+
+Signed-off-by: Costin Lupu <costin.lupu@cs.pub.ro>
+Reviewed-by: Julien Grall <jgrall@amazon.com>
+Acked-by: Ian Jackson <iwj@xenproject.org>
+Tested-by: Dario Faggioli <dfaggioli@suse.com>
+---
+ tools/ocaml/libs/xc/xenctrl_stubs.c | 10 ++++------
+ tools/ocaml/libs/xentoollog/xentoollog_stubs.c | 4 ++++
+ tools/ocaml/libs/xl/xenlight_stubs.c | 4 ++++
+ 3 files changed, 12 insertions(+), 6 deletions(-)
+
+diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c b/tools/ocaml/libs/xc/xenctrl_stubs.c
+index 6e4bc567f5..a6756c4a8c 100644
+--- a/tools/ocaml/libs/xc/xenctrl_stubs.c
++++ b/tools/ocaml/libs/xc/xenctrl_stubs.c
+@@ -37,14 +37,12 @@
+
+ #include "mmap_stubs.h"
+
+-#define PAGE_SHIFT 12
+-#define PAGE_SIZE (1UL << PAGE_SHIFT)
+-#define PAGE_MASK (~(PAGE_SIZE-1))
+-
+ #define _H(__h) ((xc_interface *)(__h))
+ #define _D(__d) ((uint32_t)Int_val(__d))
+
++#ifndef Val_none
+ #define Val_none (Val_int(0))
++#endif
+
+ #define string_of_option_array(array, index) \
+ ((Field(array, index) == Val_none) ? NULL : String_val(Field(Field(array, index), 0)))
+@@ -819,7 +817,7 @@ CAMLprim value stub_xc_domain_memory_increase_reservation(value xch,
+ CAMLparam3(xch, domid, mem_kb);
+ int retval;
+
+- unsigned long nr_extents = ((unsigned long)(Int64_val(mem_kb))) >> (PAGE_SHIFT - 10);
++ unsigned long nr_extents = ((unsigned long)(Int64_val(mem_kb))) >> (XC_PAGE_SHIFT - 10);
+
+ uint32_t c_domid = _D(domid);
+ caml_enter_blocking_section();
+@@ -925,7 +923,7 @@ CAMLprim value stub_pages_to_kib(value pages)
+ {
+ CAMLparam1(pages);
+
+- CAMLreturn(caml_copy_int64(Int64_val(pages) << (PAGE_SHIFT - 10)));
++ CAMLreturn(caml_copy_int64(Int64_val(pages) << (XC_PAGE_SHIFT - 10)));
+ }
+
+
+diff --git a/tools/ocaml/libs/xentoollog/xentoollog_stubs.c b/tools/ocaml/libs/xentoollog/xentoollog_stubs.c
+index bf64b211c2..e4306a0c2f 100644
+--- a/tools/ocaml/libs/xentoollog/xentoollog_stubs.c
++++ b/tools/ocaml/libs/xentoollog/xentoollog_stubs.c
+@@ -53,8 +53,12 @@ static char * dup_String_val(value s)
+ #include "_xtl_levels.inc"
+
+ /* Option type support as per http://www.linux-nantes.org/~fmonnier/ocaml/ocaml-wrapping-c.php */
++#ifndef Val_none
+ #define Val_none Val_int(0)
++#endif
++#ifndef Some_val
+ #define Some_val(v) Field(v,0)
++#endif
+
+ static value Val_some(value v)
+ {
+diff --git a/tools/ocaml/libs/xl/xenlight_stubs.c b/tools/ocaml/libs/xl/xenlight_stubs.c
+index 352a00134d..45b8af61c7 100644
+--- a/tools/ocaml/libs/xl/xenlight_stubs.c
++++ b/tools/ocaml/libs/xl/xenlight_stubs.c
+@@ -227,8 +227,12 @@ static value Val_string_list(libxl_string_list *c_val)
+ }
+
+ /* Option type support as per http://www.linux-nantes.org/~fmonnier/ocaml/ocaml-wrapping-c.php */
++#ifndef Val_none
+ #define Val_none Val_int(0)
++#endif
++#ifndef Some_val
+ #define Some_val(v) Field(v,0)
++#endif
+
+ static value Val_some(value v)
+ {
+--
+2.30.2
+