diff options
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.patch | 83 |
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 @@ | |||
1 | From 0eae016b6e3dce69e3fb86aca5c4f221591a2f12 Mon Sep 17 00:00:00 2001 | ||
2 | From: Andrew Cooper <andrew.cooper3@citrix.com> | ||
3 | Date: Thu, 25 Feb 2021 19:15:08 +0000 | ||
4 | Subject: [PATCH] tools/firmware: Build firmware as -ffreestanding | ||
5 | |||
6 | firmware should always have been -ffreestanding, as it doesn't execute in the | ||
7 | host environment. -ffreestanding implies -fno-builtin, so replace the option. | ||
8 | |||
9 | inttypes.h isn't a freestanding header, but the 32bitbios_support.c only wants | ||
10 | the stdint.h types so switch to the more appropriate include. | ||
11 | |||
12 | This removes the build time dependency on a 32bit libc just to compile the | ||
13 | hvmloader and friends. | ||
14 | |||
15 | Update README and the TravisCI configuration. | ||
16 | |||
17 | Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> | ||
18 | Reviewed-by: Jan Beulich <jbeulich@suse.com> | ||
19 | Reviewed-by: Ian Jackson <iwj@xenproject.org> | ||
20 | Release-Acked-by: Ian Jackson <iwj@xenproject.org> | ||
21 | Applied 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 | |||
29 | diff --git a/.travis.yml b/.travis.yml | ||
30 | index 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 | ||
41 | diff --git a/README b/README | ||
42 | index 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 | ||
55 | diff --git a/tools/firmware/Rules.mk b/tools/firmware/Rules.mk | ||
56 | index 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 | # | ||
68 | diff --git a/tools/firmware/hvmloader/32bitbios_support.c b/tools/firmware/hvmloader/32bitbios_support.c | ||
69 | index 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 | -- | ||
82 | 2.25.1 | ||
83 | |||