Files
xen/tools/firmware/Rules.mk
T
Anthony PERARD 40d96f0c7d tools: Remove -Werror everywhere else
The previous changeset, e4f5949c44 ("tools: Add -Werror by default to all
tools/"), added "-Werror" to CFLAGS in tools/Rules.mk.  Remove it from
everywhere else now it is duplicated.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Christian Lindig <christian.lindig@citrix.com>
Acked-by: Daniel P. Smith <dpsmith@apertussolutions.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Release-acked-by: Henry Wang <Henry.Wang@arm.com>
2022-10-14 16:17:41 +01:00

37 lines
1.4 KiB
Makefile

# Firmware is a 32-bit target
override XEN_TARGET_ARCH = x86_32
# User-supplied CFLAGS are not useful here.
CFLAGS =
EXTRA_CFLAGS_XEN_TOOLS =
include $(XEN_ROOT)/tools/Rules.mk
ifneq ($(debug),y)
CFLAGS += -DNDEBUG
endif
$(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS))
$(call cc-option-add,CFLAGS,CC,-fcf-protection=none)
# Do not add the .note.gnu.property section to any of the firmware objects: it
# breaks the rombios binary and is not useful for firmware anyway.
$(call cc-option-add,CFLAGS,CC,-Wa$$(comma)-mx86-used-note=no)
# Extra CFLAGS suitable for an embedded type of environment.
CFLAGS += -ffreestanding -msoft-float
# Use our own set of stand alone headers to build firmware.
#
# Ideally using -ffreestanding should be enough, but that relies on the
# compiler having the right order for include paths (ie: compiler private
# headers before system ones) or the libc headers having proper arch-agnostic
# freestanding support. This is not the case in Alpine at least which searches
# system headers before compiler ones and has arch-specific libc headers. This
# has been reported upstream:
# https://gitlab.alpinelinux.org/alpine/aports/-/issues/12477
# In the meantime (and for resilience against broken systems) use our own set
# of headers that provide what's needed for the firmware build.
CFLAGS += -nostdinc -I$(XEN_ROOT)/tools/firmware/include