On 11/12/2024 2:04 am, Volodymyr Babchuk wrote: > This patch is preparation for making stack protector > configurable. First step is to remove -fno-stack-protector flag from > EMBEDDED_EXTRA_CFLAGS so separate components (Hypervisor in this case) > can enable/disable this feature by themselves. > > Signed-off-by: Volodymyr Babchuk <volodymyr_babc...@epam.com>
This doesn't build on x86. You need this hunk too, diff --git a/xen/arch/x86/boot/Makefile b/xen/arch/x86/boot/Makefile index d45787665907..ff0d61d7ac39 100644 --- a/xen/arch/x86/boot/Makefile +++ b/xen/arch/x86/boot/Makefile @@ -17,6 +17,7 @@ obj32 := $(addprefix $(obj)/,$(obj32)) CFLAGS_x86_32 := $(subst -m64,-m32 -march=i686,$(XEN_TREEWIDE_CFLAGS)) $(call cc-options-add,CFLAGS_x86_32,CC,$(EMBEDDED_EXTRA_CFLAGS)) CFLAGS_x86_32 += -Werror -fno-builtin -g0 -msoft-float -mregparm=3 +CFLAGS_x86_32 += -fno-stack-protector CFLAGS_x86_32 += -nostdinc -include $(filter %/include/xen/config.h,$(XEN_CFLAGS)) CFLAGS_x86_32 += $(filter -I% -O%,$(XEN_CFLAGS)) -D__XEN__ because CFLAGS_x86_32 really was using -fno-stack-protector to override the compilers inbuilt choice. ~Andrew