Skip to content

Commit

Permalink
Bump allowed stack frame size for unit tests/host programs
Browse files Browse the repository at this point in the history
We tend to have a lot more things inlined when building unit tests,
so let's just up the -Wframe-larger-than to avoid hitting it.

This time, it was noticed in travis-ci with the ubuntu:latest
image.

Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
  • Loading branch information
stewartsmith committed Mar 28, 2019
1 parent 133cc8c commit 11374f2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Makefile.main
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ CWARNS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-Wmissing-prototypes -Wmissing-declarations \
-Wwrite-strings -Wcast-align \
-Winit-self \
-Wframe-larger-than=1024 \
$(call try-cflag,$(CC),--Wno-stringop-truncation) \
-Werror

Expand All @@ -45,6 +44,12 @@ HOSTCFLAGS += $(call try-cflag,$(HOSTCC),-Wjump-misses-init) \
$(call try-cflag,$(HOSTCC),-Wsuggest-attribute=noreturn)
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

VALGRIND := valgrind -q --show-reachable=yes --error-exitcode=99
Expand Down

0 comments on commit 11374f2

Please sign in to comment.