191 lines
5.5 KiB
Diff
191 lines
5.5 KiB
Diff
(patch from Alpine Linux's aports repository)
|
|
musl's stdint does not support gcc -m32 so we need to make sure that we
|
|
don't use system's stdint.h. We ship a stdind_local.h and make sure that
|
|
we use that instead
|
|
|
|
https://bugs.alpinelinux.org/issues/3308
|
|
|
|
diff --git a/tools/firmware/Rules.mk b/tools/firmware/Rules.mk
|
|
index 26bbddc..efad58c 100644
|
|
--- a/tools/firmware/Rules.mk
|
|
+++ b/tools/firmware/Rules.mk
|
|
@@ -12,6 +12,7 @@ CFLAGS += -DNDEBUG
|
|
endif
|
|
|
|
CFLAGS += -Werror
|
|
+CFLAGS += -I$(XEN_ROOT)/tools/firmware
|
|
|
|
$(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS))
|
|
|
|
diff --git a/tools/firmware/hvmloader/32bitbios_support.c b/tools/firmware/hvmloader/32bitbios_support.c
|
|
index 1141350..0ba9d38 100644
|
|
--- a/tools/firmware/hvmloader/32bitbios_support.c
|
|
+++ b/tools/firmware/hvmloader/32bitbios_support.c
|
|
@@ -20,8 +20,8 @@
|
|
* this program; If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
-#include <inttypes.h>
|
|
-#include <elf.h>
|
|
+#include <stdint_local.h>
|
|
+#include <elf_local.h>
|
|
#ifdef __sun__
|
|
#include <sys/machelf.h>
|
|
#endif
|
|
diff --git a/tools/firmware/hvmloader/config.h b/tools/firmware/hvmloader/config.h
|
|
index 844120b..8cb799f 100644
|
|
--- a/tools/firmware/hvmloader/config.h
|
|
+++ b/tools/firmware/hvmloader/config.h
|
|
@@ -1,7 +1,7 @@
|
|
#ifndef __HVMLOADER_CONFIG_H__
|
|
#define __HVMLOADER_CONFIG_H__
|
|
|
|
-#include <stdint.h>
|
|
+#include <stdint_local.h>
|
|
#include <stdbool.h>
|
|
|
|
enum virtual_vga { VGA_none, VGA_std, VGA_cirrus, VGA_pt };
|
|
diff --git a/tools/firmware/hvmloader/hypercall.h b/tools/firmware/hvmloader/hypercall.h
|
|
index 5368c30..c57bc86 100644
|
|
--- a/tools/firmware/hvmloader/hypercall.h
|
|
+++ b/tools/firmware/hvmloader/hypercall.h
|
|
@@ -31,7 +31,7 @@
|
|
#ifndef __HVMLOADER_HYPERCALL_H__
|
|
#define __HVMLOADER_HYPERCALL_H__
|
|
|
|
-#include <stdint.h>
|
|
+#include <stdint_local.h>
|
|
#include <xen/xen.h>
|
|
#include "config.h"
|
|
|
|
diff --git a/tools/firmware/hvmloader/mp_tables.c b/tools/firmware/hvmloader/mp_tables.c
|
|
index d207ecb..6dae38a 100644
|
|
--- a/tools/firmware/hvmloader/mp_tables.c
|
|
+++ b/tools/firmware/hvmloader/mp_tables.c
|
|
@@ -27,7 +27,7 @@
|
|
* this program; If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
-#include <stdint.h>
|
|
+#include <stdint_local.h>
|
|
#include "config.h"
|
|
|
|
/* number of non-processor MP table entries */
|
|
diff --git a/tools/firmware/hvmloader/option_rom.h b/tools/firmware/hvmloader/option_rom.h
|
|
index 0fefe08..66a93bc 100644
|
|
--- a/tools/firmware/hvmloader/option_rom.h
|
|
+++ b/tools/firmware/hvmloader/option_rom.h
|
|
@@ -1,7 +1,7 @@
|
|
#ifndef __HVMLOADER_OPTION_ROM_H__
|
|
#define __HVMLOADER_OPTION_ROM_H__
|
|
|
|
-#include <stdint.h>
|
|
+#include <stdint_local.h>
|
|
|
|
struct option_rom_header {
|
|
uint8_t signature[2]; /* "\x55\xaa" */
|
|
diff --git a/tools/firmware/hvmloader/pir_types.h b/tools/firmware/hvmloader/pir_types.h
|
|
index 9f9259c..7c004c8 100644
|
|
--- a/tools/firmware/hvmloader/pir_types.h
|
|
+++ b/tools/firmware/hvmloader/pir_types.h
|
|
@@ -23,7 +23,7 @@
|
|
#ifndef PIR_TYPES_H
|
|
#define PIR_TYPES_H
|
|
|
|
-#include <stdint.h>
|
|
+#include <stdint_local.h>
|
|
|
|
#define NR_PIR_SLOTS 6
|
|
|
|
diff --git a/tools/firmware/hvmloader/smbios.c b/tools/firmware/hvmloader/smbios.c
|
|
index 97a054e..e1646ee 100644
|
|
--- a/tools/firmware/hvmloader/smbios.c
|
|
+++ b/tools/firmware/hvmloader/smbios.c
|
|
@@ -19,7 +19,7 @@
|
|
* Authors: Andrew D. Ball <aball@us.ibm.com>
|
|
*/
|
|
|
|
-#include <stdint.h>
|
|
+#include <stdint_local.h>
|
|
#include <xen/xen.h>
|
|
#include <xen/version.h>
|
|
#include "smbios_types.h"
|
|
diff --git a/tools/firmware/hvmloader/smbios_types.h b/tools/firmware/hvmloader/smbios_types.h
|
|
index 7c648ec..6ea0dc8 100644
|
|
--- a/tools/firmware/hvmloader/smbios_types.h
|
|
+++ b/tools/firmware/hvmloader/smbios_types.h
|
|
@@ -25,7 +25,7 @@
|
|
#ifndef SMBIOS_TYPES_H
|
|
#define SMBIOS_TYPES_H
|
|
|
|
-#include <stdint.h>
|
|
+#include <stdint_local.h>
|
|
|
|
/* SMBIOS entry point -- must be written to a 16-bit aligned address
|
|
between 0xf0000 and 0xfffff.
|
|
diff --git a/tools/firmware/hvmloader/util.c b/tools/firmware/hvmloader/util.c
|
|
index 7da144b..5a96608 100644
|
|
--- a/tools/firmware/hvmloader/util.c
|
|
+++ b/tools/firmware/hvmloader/util.c
|
|
@@ -24,7 +24,7 @@
|
|
#include "vnuma.h"
|
|
#include <acpi2_0.h>
|
|
#include <libacpi.h>
|
|
-#include <stdint.h>
|
|
+#include <stdint_local.h>
|
|
#include <xen/xen.h>
|
|
#include <xen/memory.h>
|
|
#include <xen/sched.h>
|
|
diff --git a/tools/firmware/hvmloader/util.h b/tools/firmware/hvmloader/util.h
|
|
index 31889de..4f32283 100644
|
|
--- a/tools/firmware/hvmloader/util.h
|
|
+++ b/tools/firmware/hvmloader/util.h
|
|
@@ -2,7 +2,7 @@
|
|
#define __HVMLOADER_UTIL_H__
|
|
|
|
#include <stdarg.h>
|
|
-#include <stdint.h>
|
|
+#include <stdint_local.h>
|
|
#include <stddef.h>
|
|
#include <stdbool.h>
|
|
#include <xen/xen.h>
|
|
diff --git a/tools/firmware/rombios/32bit/pmm.c b/tools/firmware/rombios/32bit/pmm.c
|
|
index 09fec42..133cab7 100644
|
|
--- a/tools/firmware/rombios/32bit/pmm.c
|
|
+++ b/tools/firmware/rombios/32bit/pmm.c
|
|
@@ -62,7 +62,7 @@
|
|
* }
|
|
*/
|
|
|
|
-#include <stdint.h>
|
|
+#include <stdint_local.h>
|
|
#include <stddef.h>
|
|
#include "config.h"
|
|
#include "e820.h"
|
|
diff --git a/tools/firmware/rombios/32bit/util.c b/tools/firmware/rombios/32bit/util.c
|
|
index 6c1c480..52c5878 100644
|
|
--- a/tools/firmware/rombios/32bit/util.c
|
|
+++ b/tools/firmware/rombios/32bit/util.c
|
|
@@ -17,7 +17,7 @@
|
|
* this program; If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
#include <stdarg.h>
|
|
-#include <stdint.h>
|
|
+#include <stdint_local.h>
|
|
#include "rombios_compat.h"
|
|
#include "util.h"
|
|
|
|
diff --git a/tools/libacpi/acpi2_0.h b/tools/libacpi/acpi2_0.h
|
|
index 2619ba3..c0498ca 100644
|
|
--- a/tools/libacpi/acpi2_0.h
|
|
+++ b/tools/libacpi/acpi2_0.h
|
|
@@ -14,7 +14,7 @@
|
|
#ifndef _ACPI_2_0_H_
|
|
#define _ACPI_2_0_H_
|
|
|
|
-#include <stdint.h>
|
|
+#include <stdint_local.h>
|
|
#include <xen/xen.h>
|
|
#include <xen/hvm/ioreq.h>
|
|
|