tools/firmware: fix setting of fcf-protection=none
authorRoger Pau Monne <roger.pau@citrix.com>
Mon, 4 Apr 2022 10:40:43 +0000 (12:40 +0200)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 4 Apr 2022 11:30:00 +0000 (12:30 +0100)
Setting the fcf-protection=none option in EMBEDDED_EXTRA_CFLAGS in the
Makefile doesn't get it propagated to the subdirectories, so instead
set the flag in firmware/Rules.mk, like it's done for other compiler
flags.

Fixes: 3667f7f8f7 ('x86: Introduce support for CET-IBT')
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/firmware/Makefile
tools/firmware/Rules.mk

index 53ed4f161edba4942468cbd803ddbba00382afb8..345037b93b7f7987f0344f8a3ae86b4ec42a6caa 100644 (file)
@@ -6,8 +6,6 @@ TARGET      := hvmloader/hvmloader
 INST_DIR := $(DESTDIR)$(XENFIRMWAREDIR)
 DEBG_DIR := $(DESTDIR)$(DEBUG_DIR)$(XENFIRMWAREDIR)
 
-EMBEDDED_EXTRA_CFLAGS += -fcf-protection=none
-
 SUBDIRS-y :=
 SUBDIRS-$(CONFIG_OVMF) += ovmf-dir
 SUBDIRS-$(CONFIG_SEABIOS) += seabios-dir
index 9f78a7dec9750dab8f129b44e1d35112a9ca2803..c227fe25244a989a11f1a9ec7253ab0d0a514bdf 100644 (file)
@@ -15,6 +15,8 @@ CFLAGS += -Werror
 
 $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS))
 
+$(call cc-option-add,CFLAGS,CC,-fcf-protection=none)
+
 # Extra CFLAGS suitable for an embedded type of environment.
 CFLAGS += -ffreestanding -msoft-float