[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/3] tools/firmware: Build firmware as -ffreestanding

On 25.02.2021 21:30, Andrew Cooper wrote:
> firmware should always have been -ffreestanding, as it doesn't execute in the
> host environment.
> inttypes.h isn't a freestanding header, but the 32bitbios_support.c only wants
> the stdint.h types so switch to the more appropriate include.
> This removes the build time dependency on a 32bit libc just to compile the
> hvmloader and friends.
> Update README and the TravisCI configuration.
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
preferably with one further adjustment:

> --- a/tools/firmware/Rules.mk
> +++ b/tools/firmware/Rules.mk
> @@ -16,4 +16,4 @@ CFLAGS += -Werror
>  $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS))
>  # Extra CFLAGS suitable for an embedded type of environment.
> -CFLAGS += -fno-builtin -msoft-float
> +CFLAGS += -fno-builtin -msoft-float -ffreestanding

As per gcc doc -ffreestanding implies -fno-builtin, so I think you
want to replace that one instead of adding the new option on top.




Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.