Skip to content

Commit 6ac11f1

Browse files
shenkigregkh
authored andcommitted
powerpc/xmon: Relax frame size for clang
[ Upstream commit 9c87156 ] 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#252 Signed-off-by: Joel Stanley <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent f9fb2a6 commit 6ac11f1

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 $(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)