From: Andrew Cooper Date: Tue, 3 Sep 2024 10:41:56 +0000 (+0100) Subject: x86/boot: Fix include paths for 32bit objects X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=5f36fab2406299bd2c54074d81fe482af11fb2b9;p=people%2Fandrewcoop%2Fxen.git x86/boot: Fix include paths for 32bit objects Most of Xen is build using -nostdinc and a fully specified include path. However, the makefile line: $(head-bin-objs): XEN_CFLAGS := $(CFLAGS_x86_32) -fpic discards XEN_CFLAGS and replaces them with CFLAGS_x86_32. Reinstate -nostdinc, and copy the -include and all -I arguments from XEN_CFLAGS. Signed-off-by: Andrew Cooper Reviewed-by: Roger Pau Monné --- diff --git a/xen/arch/x86/boot/Makefile b/xen/arch/x86/boot/Makefile index 03d8ce3a9e..de47740277 100644 --- a/xen/arch/x86/boot/Makefile +++ b/xen/arch/x86/boot/Makefile @@ -14,10 +14,8 @@ $(obj)/head.o: $(head-bin-objs:.o=.bin) 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 -ifneq ($(abs_objtree),$(abs_srctree)) -CFLAGS_x86_32 += -I$(objtree)/include -endif -CFLAGS_x86_32 += -I$(srctree)/include +CFLAGS_x86_32 += -nostdinc -include $(filter %/include/xen/config.h,$(XEN_CFLAGS)) +CFLAGS_x86_32 += $(filter -I%,$(XEN_CFLAGS)) # override for 32bit binaries $(head-bin-objs): CFLAGS_stack_boundary :=