firmware: provide a stand alone set of headers
authorRoger Pau Monné <roger.pau@citrix.com>
Thu, 4 Mar 2021 15:49:00 +0000 (16:49 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 4 Mar 2021 15:49:00 +0000 (16:49 +0100)
commit73b13705af7c3bb8fdf11932eb68788d090a443f
treea0a50af437db1474d63ce432f7ec0c8e9156436f
parentc6ad5a701b9a6df443a6c98d9e7201c958bbcafc
firmware: provide a stand alone set of headers

The current build of the firmware relies on having 32bit compatible
headers installed in order to build some of the 32bit firmware.
Usually this can be solved by using the -ffreestanding compiler option
which drops the usage of the system headers in favor of a private set
of freestanding headers provided by the compiler itself that are not
tied to libc.

However such option is broken at least in the gcc compiler provided in
Alpine Linux, as the system include path (ie: /usr/include) takes
precedence over the gcc private include path:

#include <...> search starts here:
 /usr/include
 /usr/lib/gcc/x86_64-alpine-linux-musl/10.2.1/include

And the headers in /usr/include are exclusively 64bit.

Since -ffreestanding is currently broken on at least that distro, and
for resilience against future compilers also having the option broken
provide a set of stand alone 32bit headers required for the firmware
build.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Release-Acked-by: Ian Jackson <iwj@xenproject.org>
tools/firmware/Rules.mk
tools/firmware/include/stdarg.h [new file with mode: 0644]
tools/firmware/include/stdbool.h [new file with mode: 0644]
tools/firmware/include/stddef.h [new file with mode: 0644]
tools/firmware/include/stdint.h [new file with mode: 0644]
tools/firmware/rombios/32bit/rombios_compat.h