Apply an upstream Xen Release-acked patch to fix kdd debugger
and remove the temporary inhibit of Werror on building that tool.

Signed-off-by: Christopher Clark <[email protected]>
---
 ...xen-build-temporarily-inhibit-Werror.patch | 12 ------
 .../files/xen-tools-kdd-fix-build-again.patch | 39 +++++++++++++++++++
 recipes-extended/xen/xen-tools_git.bb         |  1 +
 3 files changed, 40 insertions(+), 12 deletions(-)
 create mode 100644 
recipes-extended/xen/files/xen-tools-kdd-fix-build-again.patch

diff --git 
a/recipes-extended/xen/files/0001-xen-build-temporarily-inhibit-Werror.patch 
b/recipes-extended/xen/files/0001-xen-build-temporarily-inhibit-Werror.patch
index 6e43a4f..ba97c4b 100644
--- a/recipes-extended/xen/files/0001-xen-build-temporarily-inhibit-Werror.patch
+++ b/recipes-extended/xen/files/0001-xen-build-temporarily-inhibit-Werror.patch
@@ -40,15 +40,3 @@ index a151b3f625..a05ceec1e5 100644
 -- 
 2.19.1
 
-diff --git a/tools/debugger/kdd/Makefile b/tools/debugger/kdd/Makefile
-index 26116949d4..a72ad3b1e0 100644
---- a/tools/debugger/kdd/Makefile
-+++ b/tools/debugger/kdd/Makefile
-@@ -1,7 +1,6 @@
- XEN_ROOT = $(CURDIR)/../../..
- include $(XEN_ROOT)/tools/Rules.mk
- 
--CFLAGS  += -Werror
- CFLAGS  += $(CFLAGS_libxenctrl)
- CFLAGS  += -DXC_WANT_COMPAT_MAP_FOREIGN_API
- LDLIBS  += $(LDLIBS_libxenctrl)
diff --git a/recipes-extended/xen/files/xen-tools-kdd-fix-build-again.patch 
b/recipes-extended/xen/files/xen-tools-kdd-fix-build-again.patch
new file mode 100644
index 0000000..6122999
--- /dev/null
+++ b/recipes-extended/xen/files/xen-tools-kdd-fix-build-again.patch
@@ -0,0 +1,39 @@
+From d44cbbe0f3243afcc56e47dcfa97bbfe23e46fbb Mon Sep 17 00:00:00 2001
+From: Wei Liu <[email protected]>
+Date: Fri, 3 Jul 2020 20:10:01 +0000
+Subject: [PATCH] kdd: fix build again
+
+Restore Tim's patch. The one that was committed was recreated by me
+because git didn't accept my saved copy. I made some mistakes while
+recreating that patch and here we are.
+
+Fixes: 3471cafbdda3 ("kdd: stop using [0] arrays to access packet contents")
+Reported-by: Michael Young <[email protected]>
+Signed-off-by: Wei Liu <[email protected]>
+Reviewed-by: Tim Deegan <[email protected]>
+Release-acked-by: Paul Durrant <[email protected]>
+---
+ tools/debugger/kdd/kdd.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tools/debugger/kdd/kdd.c b/tools/debugger/kdd/kdd.c
+index 866532f0c7..a7d0976ea4 100644
+--- a/tools/debugger/kdd/kdd.c
++++ b/tools/debugger/kdd/kdd.c
+@@ -79,11 +79,11 @@ typedef struct {
+ /* State of the debugger stub */
+ typedef struct {
+     union {
+-        uint8_t txb[sizeof (kdd_hdr)];           /* Marshalling area for tx */
++        uint8_t txb[sizeof (kdd_pkt)];           /* Marshalling area for tx */
+         kdd_pkt txp;                 /* Also readable as a packet structure */
+     };
+     union {
+-        uint8_t rxb[sizeof (kdd_hdr)];           /* Marshalling area for rx */
++        uint8_t rxb[sizeof (kdd_pkt)];           /* Marshalling area for rx */
+         kdd_pkt rxp;                 /* Also readable as a packet structure */
+     };
+     unsigned int cur;       /* Offset into rx where we'll put the next byte */
+-- 
+2.17.1
+
diff --git a/recipes-extended/xen/xen-tools_git.bb 
b/recipes-extended/xen/xen-tools_git.bb
index 5f41915..679feb1 100644
--- a/recipes-extended/xen/xen-tools_git.bb
+++ b/recipes-extended/xen/xen-tools_git.bb
@@ -8,6 +8,7 @@ SRC_URI = " \
     file://0001-python-pygrub-pass-DISTUTILS-xen.4.12.patch \
     file://0001-xen-build-temporarily-inhibit-Werror.patch \
     file://xen-tools-kdd-stop-using-0-arrays-to-access-packet-contents.patch \
+    file://xen-tools-kdd-fix-build-again.patch \
     "
 
 LIC_FILES_CHKSUM ?= "file://COPYING;md5=4295d895d4b5ce9d070263d52f030e49"
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#5546): 
https://lists.yoctoproject.org/g/meta-virtualization/message/5546
Mute This Topic: https://lists.yoctoproject.org/mt/75348301/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to