From c20e1117d9aa22c558646a1060ddd1dd042fb107 Mon Sep 17 00:00:00 2001 From: Max Filippov Date: Fri, 23 Apr 2021 00:34:44 -0700 Subject: xtensa: add kernel ABI selection to Kconfig Add choice to use default or call0 ABI for the kernel code. If call0 ABI is chosen add '-mabi=call0' to the flags. The toolchain support for this option is rather new so only enable it when the compiler supports it. Signed-off-by: Max Filippov --- arch/xtensa/Makefile | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'arch/xtensa/Makefile') diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile index 725cd4cd8b30..5097caa7bf0c 100644 --- a/arch/xtensa/Makefile +++ b/arch/xtensa/Makefile @@ -35,6 +35,10 @@ KBUILD_CFLAGS += -ffreestanding -D__linux__ KBUILD_CFLAGS += -pipe -mlongcalls -mtext-section-literals KBUILD_CFLAGS += $(call cc-option,-mforce-no-pic,) KBUILD_CFLAGS += $(call cc-option,-mno-serialize-volatile,) +ifneq ($(CONFIG_KERNEL_ABI_CALL0),) +KBUILD_CFLAGS += -mabi=call0 +KBUILD_AFLAGS += -mabi=call0 +endif KBUILD_AFLAGS += -mlongcalls -mtext-section-literals -- cgit v1.2.3