Skip to content

Commit 78b0af3

Browse files
shenkiintel-lab-lkp
authored andcommitted
powerpc/xmon: Relax frame size for clang
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]>
1 parent 3b9672f commit 78b0af3

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
@@ -11,6 +11,12 @@ UBSAN_SANITIZE := n
1111
ORIG_CFLAGS := $(KBUILD_CFLAGS)
1212
KBUILD_CFLAGS = $(subst $(CC_FLAGS_FTRACE),,$(ORIG_CFLAGS))
1313

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

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

0 commit comments

Comments
 (0)