aboutsummaryrefslogtreecommitdiff
path: root/Makefile.main
diff options
context:
space:
mode:
authorAnton Blanchard <anton@ozlabs.org>2021-08-02 11:02:10 +1000
committerVasant Hegde <hegdevasant@linux.vnet.ibm.com>2021-08-04 13:01:22 +0530
commitfcc828cdc9616457a643389387f0ca9fba12b867 (patch)
treed3b9e261a2f562cf8503ae8c53ee5fdf08c75db5 /Makefile.main
parent5f670896164383d0d088f8d82b10b4e7e025316b (diff)
downloadskiboot-fcc828cdc9616457a643389387f0ca9fba12b867.zip
skiboot-fcc828cdc9616457a643389387f0ca9fba12b867.tar.gz
skiboot-fcc828cdc9616457a643389387f0ca9fba12b867.tar.bz2
Don't warn about stack size on host binaries
I'm hitting a stack size warning when building pflash: common/arch_flash_powerpc.c: In function ‘get_dev_mtd.constprop’: common/arch_flash_powerpc.c:177:1: error: the frame size of 8240 bytes is larger than 2048 bytes [-Werror=frame-larger-than=] That function has 2 PATH_MAX strings, each of which will use up 4kB of stack. We've tried to work around the issue of stack size warnings on host binaries in a few places, with limited success. This patch removes the check completely instead. We need to modify the HOSTCFLAGS variable assignment to be immediate for this to work. Signed-off-by: Anton Blanchard <anton@ozlabs.org> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Diffstat (limited to 'Makefile.main')
-rw-r--r--Makefile.main5
1 files changed, 1 insertions, 4 deletions
diff --git a/Makefile.main b/Makefile.main
index d21f27b..189b4ae 100644
--- a/Makefile.main
+++ b/Makefile.main
@@ -51,7 +51,7 @@ endif
# Host tools and options
HOSTCC=gcc
HOSTEND=$(shell uname -m | sed -e 's/^i.*86$$/LITTLE/' -e 's/^x86.*/LITTLE/' -e 's/^ppc64le/LITTLE/' -e 's/^ppc.*/BIG/')
-HOSTCFLAGS=-O1 $(CWARNS) -DHAVE_$(HOSTEND)_ENDIAN -MMD
+HOSTCFLAGS:=-O1 $(CWARNS) -DHAVE_$(HOSTEND)_ENDIAN -MMD
HOSTCFLAGS += $(call try-cflag,$(HOSTCC),-std=gnu11)
HOSTCFLAGS += $(call try-cflag,$(HOSTCC),-m64)
HOSTCFLAGS += $(call try-cflag,$(HOSTCC),-Wjump-misses-init) \
@@ -62,9 +62,6 @@ HOSTCFLAGS += $(call try-cflag,$(HOSTCC),-Wjump-misses-init) \
HOSTCFLAGS += -DDEBUG -DCCAN_LIST_DEBUG
# We want small stack usage for skiboot
-# but host compilation of unit tests tend to inline heavily,
-# which creates larger stack frames and triggering useless warnings
-HOSTCFLAGS += -Wframe-larger-than=4096
CWARNS += -Wframe-larger-than=1024
HOSTGCOVCFLAGS = -fprofile-arcs -ftest-coverage -lgcov -O0 -g -pg