On 22.11.2024 10:33, Frediano Ziglio wrote:
> Not all headers can be used by 32 bit boot code.
> Allows to override some headers, we don't want to mess up with
> main headers as most of the code is only 64 bit so the easy stuff should
> be done for 64 bit declarations.
> Boot headers should be 64 bit compatibles to avoid having multiple
> declarations.

I'm afraid that in isolation it's not clear what is intended. Boot code is
all located in a single directory. Can't we use local headers there, using
#include "...", instead of ...

> --- a/xen/arch/x86/boot/Makefile
> +++ b/xen/arch/x86/boot/Makefile
> @@ -18,7 +18,7 @@ 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 += -nostdinc -include $(filter 
> %/include/xen/config.h,$(XEN_CFLAGS))
> -CFLAGS_x86_32 += $(filter -I% -O%,$(XEN_CFLAGS)) -D__XEN__
> +CFLAGS_x86_32 += -I$(srctree)/arch/x86/include/boot $(filter -I% 
> -O%,$(XEN_CFLAGS)) -D__XEN__

... introducing a arch-wide subdir, which non-boot code could easily (ab)use?

Jan

Reply via email to