From: Felix Moessbauer <
felix.mo...@siemens.com>
These flags require libc support which we do not have in the EFI part.
As distro builders inject the hardening flags into CFLAGS, which is fine
for the userspace part, but for EFI we need to override it.
Signed-off-by: Felix Moessbauer <
felix.mo...@siemens.com>
---
Makefile.am | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 3b05e7c..831ed68 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -217,13 +217,18 @@ efi_cflags = \
-fshort-wchar \
-ffreestanding \
-fno-strict-aliasing \
- -fno-stack-protector \
-Wsign-compare \
-DGNU_EFI_USE_MS_ABI \
-Werror \
$(CFLAGS_MGENERAL_REGS_ONLY) \
$(CFLAGS)
+# the stack protectors needs libc support which we don't have in the EFI part
+# distro builders inject the hardening variables into CFLAGS, which is fine
+# for the userspace part, but for EFI we need to override it.
+efi_cflags += \
+ -fno-stack-protector
+
if ARCH_X86_64
efi_cflags += \
-mno-red-zone
--
2.39.2