From c420d538ee4e02d634d01cd30dd6ed5b6dafcc44 Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Tue, 15 Nov 2022 12:08:30 -0700 Subject: [PATCH] soc/amd/common: Don't set gcc specific options for clang builds Clang doesn't understand the -Wstack-usage=40960 option. Replace it with -Wframe-larger-than=40960. Signed-off-by: Martin Roth Change-Id: I7d8b9c26d3fc861615a8553332ed1070974b751b Reviewed-on: https://review.coreboot.org/c/coreboot/+/69662 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans Reviewed-by: Fred Reitberger Reviewed-by: Elyes Haouas Reviewed-by: Felix Held --- src/soc/amd/common/psp_verstage/Makefile.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/soc/amd/common/psp_verstage/Makefile.inc b/src/soc/amd/common/psp_verstage/Makefile.inc index fb82ef4869..54e1d0a37f 100644 --- a/src/soc/amd/common/psp_verstage/Makefile.inc +++ b/src/soc/amd/common/psp_verstage/Makefile.inc @@ -4,8 +4,12 @@ verstage-generic-ccopts += -I$(src)/soc/amd/common/psp_verstage/include verstage-generic-ccopts += -D__USER_SPACE__ CPPFLAGS_common += -I$(VBOOT_SOURCE)/firmware/2lib/include/ +ifeq ($(CONFIG_COMPILER_GCC),y) # This size should match the size in the linker script. CFLAGS_arm += -Wstack-usage=40960 +else +CFLAGS_arm += -Wframe-larger-than=40960 +endif verstage-y += boot_dev.c verstage-y += delay.c