x86/boot: Optimise 32 bit C source code
PATCH v4 1/2 x86/boot: Optimise 32 bit C source code
The various filters are removing all optimisations. No need to have all optimisations turned off.
--- xen/arch/x86/boot/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
---
Changes since v2:
- combine filter calls together;
- added additional patch.
xen/arch/x86/boot/Makefile +1 -1
@@ -15,7 +15,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%,$(XEN_CFLAGS)) +CFLAGS_x86_32 += $(filter -I% -O%,$(XEN_CFLAGS)) # override for 32bit binaries $(head-bin-objs): CFLAGS_stack_boundary :=
Signature · 1 line
2.34.1
PATCH v4 2/2 x86/boot: Add missing __XEN__ definition
We are compiling Xen source code so we should define __XEN__ macro. We don't want to import all definitions from XEN_CFLAGS (as done for other options) because most of them are processor dependent and do not apply to 32 bit.
--- xen/arch/x86/boot/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
---
Changes since v3:
- improve commit message.
xen/arch/x86/boot/Makefile +1 -1
@@ -15,7 +15,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)) +CFLAGS_x86_32 += $(filter -I% -O%,$(XEN_CFLAGS)) -D__XEN__ # override for 32bit binaries $(head-bin-objs): CFLAGS_stack_boundary :=
Signature · 1 line
2.34.1
Re: [PATCH v4 2/2] x86/boot: Add missing __XEN__ definition
Quoted 6 lines · Frediano Ziglio
We are compiling Xen source code so we should define
__XEN__macro. We don't want to import all definitions fromXEN_CFLAGS(as done for other options) because most of them are processor dependent and do not apply to 32 bit.Signed-off-by Frediano Ziglio <[email protected]>
Both Acked-by: Andrew Cooper <[email protected]> and queued.