diff options
Diffstat (limited to 'recipes-extended/xen/files')
3 files changed, 73 insertions, 86 deletions
diff --git a/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch b/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch new file mode 100644 index 00000000..35cd9a81 --- /dev/null +++ b/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch | |||
@@ -0,0 +1,73 @@ | |||
1 | From 6db88791d923167f160afbcadeffad84a4cbdbc5 Mon Sep 17 00:00:00 2001 | ||
2 | Message-Id: <6db88791d923167f160afbcadeffad84a4cbdbc5.1612262706.git.bertrand.marquis@arm.com> | ||
3 | From: Maciej Pijanowski <maciej.pijanowski@3mdeb.com> | ||
4 | Date: Fri, 19 Oct 2018 11:01:37 +0200 | ||
5 | Subject: [PATCH] python,pygrub: pass DISTUTILS env vars as setup.py args | ||
6 | |||
7 | Upstream-Status: Xen: Inappropriate [oe specific, python install issues] | ||
8 | |||
9 | Allow to respect the target install dir (PYTHON_SITEPACKAGES_DIR) | ||
10 | as well as other parameters set by the OpenEmbedded build system. | ||
11 | This is especially useful when the target libdir is not the default one | ||
12 | (/usr/lib), but for example /usr/lib64. | ||
13 | |||
14 | Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com> | ||
15 | |||
16 | Forward-ported to Xen 4.12.0 | ||
17 | Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com> | ||
18 | |||
19 | Modified to support pygrub installation with python 3 | ||
20 | Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com> | ||
21 | |||
22 | Forward-ported to Xen 4.14.0 | ||
23 | Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com> | ||
24 | |||
25 | Forward-ported to Xen 4.15.0 | ||
26 | Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com> | ||
27 | |||
28 | --- | ||
29 | tools/pygrub/Makefile | 7 +++++-- | ||
30 | tools/python/Makefile | 2 +- | ||
31 | 2 files changed, 6 insertions(+), 3 deletions(-) | ||
32 | |||
33 | diff --git a/tools/pygrub/Makefile b/tools/pygrub/Makefile | ||
34 | index 37b2146214..ffb9270065 100644 | ||
35 | --- a/tools/pygrub/Makefile | ||
36 | +++ b/tools/pygrub/Makefile | ||
37 | @@ -10,7 +10,7 @@ INSTALL_LOG = build/installed_files.txt | ||
38 | all: build | ||
39 | .PHONY: build | ||
40 | build: | ||
41 | - CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) setup.py build | ||
42 | + CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) setup.py build $(DISTUTILS_BUILD_ARGS) | ||
43 | |||
44 | .PHONY: install | ||
45 | install: all | ||
46 | @@ -18,7 +18,10 @@ install: all | ||
47 | CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" \ | ||
48 | LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) setup.py install \ | ||
49 | --record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \ | ||
50 | - --root="$(DESTDIR)" --install-scripts=$(LIBEXEC_BIN) --force | ||
51 | + --root="$(DESTDIR)" --install-scripts=$(LIBEXEC_BIN) --force \ | ||
52 | + $(DISTUTILS_INSTALL_ARGS) | ||
53 | + rm -f $(DESTDIR)/$(LIBEXEC_BIN)/pygrub | ||
54 | + $(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(LIBEXEC_BIN)/pygrub | ||
55 | set -e; if [ $(bindir) != $(LIBEXEC_BIN) -a \ | ||
56 | "`readlink -f $(DESTDIR)/$(bindir)`" != \ | ||
57 | "`readlink -f $(LIBEXEC_BIN)`" ]; then \ | ||
58 | diff --git a/tools/python/Makefile b/tools/python/Makefile | ||
59 | index cc76423647..5cb11ae453 100644 | ||
60 | --- a/tools/python/Makefile | ||
61 | +++ b/tools/python/Makefile | ||
62 | @@ -12,7 +12,7 @@ setup.py = CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" LDFLAGS="$(PY_LDFLA | ||
63 | SHLIB_libxenctrl="$(SHLIB_libxenctrl)" \ | ||
64 | SHLIB_libxenguest="$(SHLIB_libxenguest)" \ | ||
65 | SHLIB_libxenstore="$(SHLIB_libxenstore)" \ | ||
66 | - $(PYTHON) setup.py | ||
67 | + $(PYTHON) setup.py $(DISTUTILS_BUILD_ARGS) | ||
68 | |||
69 | .PHONY: build | ||
70 | build: | ||
71 | -- | ||
72 | 2.17.1 | ||
73 | |||
diff --git a/recipes-extended/xen/files/0001-tools-xenpmd-Fix-gcc10-snprintf-warning.patch b/recipes-extended/xen/files/0001-tools-xenpmd-Fix-gcc10-snprintf-warning.patch deleted file mode 100644 index 0a136c90..00000000 --- a/recipes-extended/xen/files/0001-tools-xenpmd-Fix-gcc10-snprintf-warning.patch +++ /dev/null | |||
@@ -1,60 +0,0 @@ | |||
1 | From 0dfddb2116e3757f77a691a3fe335173088d69dc Mon Sep 17 00:00:00 2001 | ||
2 | Message-Id: <0dfddb2116e3757f77a691a3fe335173088d69dc.1604734077.git.bertrand.marquis@arm.com> | ||
3 | From: Bertrand Marquis <bertrand.marquis@arm.com> | ||
4 | Date: Thu, 15 Oct 2020 10:16:09 +0100 | ||
5 | Subject: [PATCH] tools/xenpmd: Fix gcc10 snprintf warning | ||
6 | |||
7 | Add a check for snprintf return code and ignore the entry if we get an | ||
8 | error. This should in fact never happen and is more a trick to make gcc | ||
9 | happy and prevent compilation errors. | ||
10 | |||
11 | This is solving the following gcc warning when compiling for arm32 host | ||
12 | platforms with optimization activated: | ||
13 | xenpmd.c:92:37: error: '%s' directive output may be truncated writing | ||
14 | between 4 and 2147483645 bytes into a region of size 271 | ||
15 | [-Werror=format-truncation=] | ||
16 | |||
17 | This is also solving the following Debian bug: | ||
18 | https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=970802 | ||
19 | |||
20 | Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com> | ||
21 | Acked-by: Wei Liu <wl@xen.org> | ||
22 | --- | ||
23 | Upstream-status: Backport from 4.15 | ||
24 | --- | ||
25 | tools/xenpmd/xenpmd.c | 9 +++++++-- | ||
26 | 1 file changed, 7 insertions(+), 2 deletions(-) | ||
27 | |||
28 | diff --git a/tools/xenpmd/xenpmd.c b/tools/xenpmd/xenpmd.c | ||
29 | index 35fd1c931a..12b82cf43e 100644 | ||
30 | --- a/tools/xenpmd/xenpmd.c | ||
31 | +++ b/tools/xenpmd/xenpmd.c | ||
32 | @@ -102,6 +102,7 @@ FILE *get_next_battery_file(DIR *battery_dir, | ||
33 | FILE *file = 0; | ||
34 | struct dirent *dir_entries; | ||
35 | char file_name[284]; | ||
36 | + int ret; | ||
37 | |||
38 | do | ||
39 | { | ||
40 | @@ -111,11 +112,15 @@ FILE *get_next_battery_file(DIR *battery_dir, | ||
41 | if ( strlen(dir_entries->d_name) < 4 ) | ||
42 | continue; | ||
43 | if ( battery_info_type == BIF ) | ||
44 | - snprintf(file_name, sizeof(file_name), BATTERY_INFO_FILE_PATH, | ||
45 | + ret = snprintf(file_name, sizeof(file_name), BATTERY_INFO_FILE_PATH, | ||
46 | dir_entries->d_name); | ||
47 | else | ||
48 | - snprintf(file_name, sizeof(file_name), BATTERY_STATE_FILE_PATH, | ||
49 | + ret = snprintf(file_name, sizeof(file_name), BATTERY_STATE_FILE_PATH, | ||
50 | dir_entries->d_name); | ||
51 | + /* This should not happen but is needed to pass gcc checks */ | ||
52 | + if (ret < 0) | ||
53 | + continue; | ||
54 | + file_name[sizeof(file_name) - 1] = '\0'; | ||
55 | file = fopen(file_name, "r"); | ||
56 | } while ( !file ); | ||
57 | |||
58 | -- | ||
59 | 2.17.1 | ||
60 | |||
diff --git a/recipes-extended/xen/files/0001-xen-build-temporarily-inhibit-Werror-4.14.patch b/recipes-extended/xen/files/0001-xen-build-temporarily-inhibit-Werror-4.14.patch deleted file mode 100644 index 0e0a3dc4..00000000 --- a/recipes-extended/xen/files/0001-xen-build-temporarily-inhibit-Werror-4.14.patch +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | From 9cff3bf8425ccc593825fcde8ca5eaa32a43d04d Mon Sep 17 00:00:00 2001 | ||
2 | From: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
3 | Date: Thu, 18 Jun 2020 09:05:22 -0400 | ||
4 | Subject: [PATCH] xen/build: temporarily inhibit Werror | ||
5 | |||
6 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
7 | Rebased on Xen 4.14: | ||
8 | Signed-off-by: Christopher Clark <christopher.w.clark@gmail.com> | ||
9 | --- | ||
10 | tools/libxl/Makefile | 2 +- | ||
11 | xen/Rules.mk | 2 +- | ||
12 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
13 | |||
14 | diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile | ||
15 | index 6da342ed61..c67560e269 100644 | ||
16 | --- a/tools/libxl/Makefile | ||
17 | +++ b/tools/libxl/Makefile | ||
18 | @@ -11,7 +11,7 @@ MINOR = 0 | ||
19 | XLUMAJOR = 4.14 | ||
20 | XLUMINOR = 0 | ||
21 | |||
22 | -CFLAGS += -Werror -Wno-format-zero-length -Wmissing-declarations \ | ||
23 | +CFLAGS += -Wno-format-zero-length -Wmissing-declarations \ | ||
24 | -Wno-declaration-after-statement -Wformat-nonliteral | ||
25 | CFLAGS += -I. -fPIC | ||
26 | |||