summaryrefslogtreecommitdiffstats
path: root/recipes-extended/xen/files/0001-tools-firmware-Build-firmware-as-ffreestanding-Xen-4.14.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-extended/xen/files/0001-tools-firmware-Build-firmware-as-ffreestanding-Xen-4.14.patch')
-rw-r--r--recipes-extended/xen/files/0001-tools-firmware-Build-firmware-as-ffreestanding-Xen-4.14.patch83
1 files changed, 83 insertions, 0 deletions
diff --git a/recipes-extended/xen/files/0001-tools-firmware-Build-firmware-as-ffreestanding-Xen-4.14.patch b/recipes-extended/xen/files/0001-tools-firmware-Build-firmware-as-ffreestanding-Xen-4.14.patch
new file mode 100644
index 00000000..001b196d
--- /dev/null
+++ b/recipes-extended/xen/files/0001-tools-firmware-Build-firmware-as-ffreestanding-Xen-4.14.patch
@@ -0,0 +1,83 @@
1From 0eae016b6e3dce69e3fb86aca5c4f221591a2f12 Mon Sep 17 00:00:00 2001
2From: Andrew Cooper <andrew.cooper3@citrix.com>
3Date: Thu, 25 Feb 2021 19:15:08 +0000
4Subject: [PATCH] tools/firmware: Build firmware as -ffreestanding
5
6firmware should always have been -ffreestanding, as it doesn't execute in the
7host environment. -ffreestanding implies -fno-builtin, so replace the option.
8
9inttypes.h isn't a freestanding header, but the 32bitbios_support.c only wants
10the stdint.h types so switch to the more appropriate include.
11
12This removes the build time dependency on a 32bit libc just to compile the
13hvmloader and friends.
14
15Update README and the TravisCI configuration.
16
17Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
18Reviewed-by: Jan Beulich <jbeulich@suse.com>
19Reviewed-by: Ian Jackson <iwj@xenproject.org>
20Release-Acked-by: Ian Jackson <iwj@xenproject.org>
21Applied to m-v Xen 4.14 series: Christopher Clark <christopher.w.clark@gmail.com>
22---
23 .travis.yml | 1 -
24 README | 3 ---
25 tools/firmware/Rules.mk | 2 +-
26 tools/firmware/hvmloader/32bitbios_support.c | 2 +-
27 4 files changed, 2 insertions(+), 6 deletions(-)
28
29diff --git a/.travis.yml b/.travis.yml
30index 15ca9e9047..2362475f7a 100644
31--- a/.travis.yml
32+++ b/.travis.yml
33@@ -58,7 +58,6 @@ addons:
34 - acpica-tools
35 - bin86
36 - bcc
37- - libc6-dev-i386
38 - libnl-3-dev
39 - ocaml-nox
40 - libfindlib-ocaml-dev
41diff --git a/README b/README
42index 6e15242ae1..8c99c30986 100644
43--- a/README
44+++ b/README
45@@ -62,9 +62,6 @@ provided by your OS distributor:
46 * GNU bison and GNU flex
47 * GNU gettext
48 * ACPI ASL compiler (iasl)
49- * Libc multiarch package (e.g. libc6-dev-i386 / glibc-devel.i686).
50- Required when building on a 64-bit platform to build
51- 32-bit components which are enabled on a default build.
52
53 In addition to the above there are a number of optional build
54 prerequisites. Omitting these will cause the related features to be
55diff --git a/tools/firmware/Rules.mk b/tools/firmware/Rules.mk
56index cb388b7011..9f78a7dec9 100644
57--- a/tools/firmware/Rules.mk
58+++ b/tools/firmware/Rules.mk
59@@ -16,7 +16,7 @@ CFLAGS += -Werror
60 $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS))
61
62 # Extra CFLAGS suitable for an embedded type of environment.
63-CFLAGS += -fno-builtin -msoft-float
64+CFLAGS += -ffreestanding -msoft-float
65
66 # Use our own set of stand alone headers to build firmware.
67 #
68diff --git a/tools/firmware/hvmloader/32bitbios_support.c b/tools/firmware/hvmloader/32bitbios_support.c
69index 114135022e..ef681d4f57 100644
70--- a/tools/firmware/hvmloader/32bitbios_support.c
71+++ b/tools/firmware/hvmloader/32bitbios_support.c
72@@ -20,7 +20,7 @@
73 * this program; If not, see <http://www.gnu.org/licenses/>.
74 */
75
76-#include <inttypes.h>
77+#include <stdint.h>
78 #include <elf.h>
79 #ifdef __sun__
80 #include <sys/machelf.h>
81--
822.25.1
83