mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
Prevent the assembler from creating a .note.gnu.property section on
the output objects, as it's not useful for firmware related binaries,
and breaks the resulting rombios image.
This requires modifying the cc-option Makefile macro so it can test
assembler options (by replacing the usage of the -S flag with -c) and
also stripping the -Wa, prefix if present when checking for the test
output.
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: e270af9428
master date: 2022-04-04 12:30:07 +0100
26 lines
664 B
Makefile
26 lines
664 B
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
|
|
|
|
CFLAGS += -Werror
|
|
|
|
$(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 += -fno-builtin -msoft-float
|