Skip to content

Commit 15cb653

Browse files
shenkiTenSeventy7
authored andcommitted
powerpc/xmon: Relax frame size for clang
[ Upstream commit 9c87156cce5a63735d1218f0096a65c50a7a32aa ] When building with clang (8 trunk, 7.0 release) the frame size limit is hit: arch/powerpc/xmon/xmon.c:452:12: warning: stack frame size of 2576 bytes in function 'xmon_core' [-Wframe-larger-than=] Some investigation by Naveen indicates this is due to clang saving the addresses to printf format strings on the stack. While this issue is investigated, bump up the frame size limit for xmon when building with clang. Link: ClangBuiltLinux/linux#252 Signed-off-by: Joel Stanley <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 684d2a0 commit 15cb653

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

arch/powerpc/xmon/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ UBSAN_SANITIZE := n
1313
ORIG_CFLAGS := $(KBUILD_CFLAGS)
1414
KBUILD_CFLAGS = $(subst -mno-sched-epilog,,$(subst $(CC_FLAGS_FTRACE),,$(ORIG_CFLAGS)))
1515

16+
ifdef CONFIG_CC_IS_CLANG
17+
# clang stores addresses on the stack causing the frame size to blow
18+
# out. See https://github.com/ClangBuiltLinux/linux/issues/252
19+
KBUILD_CFLAGS += -Wframe-larger-than=4096
20+
endif
21+
1622
ccflags-$(CONFIG_PPC64) := $(NO_MINIMAL_TOC)
1723

1824
obj-y += xmon.o nonstdio.o spr_access.o

0 commit comments

Comments
 (0)