Skip to contentSkip to conversation

efi: fix errors in building: requires -maccumulate-outgoing-args

PATCH In review Zhu Lingshan 2 participants 2 messages Jun 14, 2020 EFI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 efi: fix errors in building: requires -maccumulate-outgoing-args

when build kernel with default config, efi/libstub won't build,
complain: sorry, unimplemented: ms_abi attribute requires -maccumulate-outgoing-args or subtarget optimization implying it

This commit intends to add -maccumulate-outgoing-args to Makefile cflags, make builder happy.

---
 drivers/firmware/efi/libstub/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/efi/libstub/Makefile +1 -1
index 75daaf2..a4541b2 100644
@@ -6,7 +6,7 @@
 # enabled, even if doing so doesn't break the build.
 #
 cflags-$(CONFIG_X86_32)		:= -march=i386
-cflags-$(CONFIG_X86_64)		:= -mcmodel=small
+cflags-$(CONFIG_X86_64)		:= -mcmodel=small -maccumulate-outgoing-args
 cflags-$(CONFIG_X86)		+= -m$(BITS) -D__KERNEL__ \
 				   -fPIC -fno-strict-aliasing -mno-red-zone \
 				   -mno-mmx -mno-sse -fshort-wchar \
Signature · 1 line
1.8.3.1
maintainer
#1 lore raw
Quoted 10 lines · Zhu Lingshan

when build kernel with default config, efi/libstub won't build,
complain: sorry, unimplemented: ms_abi attribute requires -maccumulate-outgoing-args or subtarget optimization implying it

This commit intends to add -maccumulate-outgoing-args to Makefile cflags, make builder happy.

Thank you Zhu. You are number #4 to report this to the linux-efi mailing list, and a fix was already suggested.

https://lore.kernel.org/linux-efi/[email protected]/

Upgrading to something more recent than GCC 4.8 could be another workaround, if that is an option for you. The fix should hopefully be in by -rc2

Quoted 20 lines
---
 drivers/firmware/efi/libstub/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/firmware/efi/libstub/Makefile +1 -2
index 75daaf2..a4541b2 100644
@@ -6,7 +6,7 @@
 # enabled, even if doing so doesn't break the build.
 #
 cflags-$(CONFIG_X86_32)                := -march=i386
-cflags-$(CONFIG_X86_64)                := -mcmodel=small
+cflags-$(CONFIG_X86_64)                := -mcmodel=small -maccumulate-outgoing-args
 cflags-$(CONFIG_X86)           += -m$(BITS) -D__KERNEL__ \
                                   -fPIC -fno-strict-aliasing -mno-red-zone \
                                   -mno-mmx -mno-sse -fshort-wchar \
--

1.8.3.1