summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-04-25 17:35:30 +0200
committerSasha Levin <sasha.levin@oracle.com>2016-06-06 19:11:02 -0400
commitd309146022288a170f7ccce52c74eb506f535f6a (patch)
treeb2ed886ed44b5747c3e6c58116f9d4d905bc4376 /Makefile
parentf1df969d3a2345a75b26117843fbc12104ba25f0 (diff)
downloadlinux-stable-d309146022288a170f7ccce52c74eb506f535f6a.tar.gz
linux-stable-d309146022288a170f7ccce52c74eb506f535f6a.tar.bz2
linux-stable-d309146022288a170f7ccce52c74eb506f535f6a.zip
gcov: disable tree-loop-im to reduce stack usage
[ Upstream commit c87bf431448b404a6ef5fbabd74c0e3e42157a7f ] Enabling CONFIG_GCOV_PROFILE_ALL produces us a lot of warnings like lib/lz4/lz4hc_compress.c: In function 'lz4_compresshcctx': lib/lz4/lz4hc_compress.c:514:1: warning: the frame size of 1504 bytes is larger than 1024 bytes [-Wframe-larger-than=] After some investigation, I found that this behavior started with gcc-4.9, and opened https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69702. A suggested workaround for it is to use the -fno-tree-loop-im flag that turns off one of the optimization stages in gcc, so the code runs a little slower but does not use excessive amounts of stack. We could make this conditional on the gcc version, but I could not find an easy way to do this in Kbuild and the benefit would be fairly small, given that most of the gcc version in production are affected now. I'm marking this for 'stable' backports because it addresses a bug with code generation in gcc that exists in all kernel versions with the affected gcc releases. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com> Cc: stable@vger.kernel.org Signed-off-by: Michal Marek <mmarek@suse.com> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 0df57f0a9e11..c4e7e01b1d15 100644
--- a/Makefile
+++ b/Makefile
@@ -376,7 +376,7 @@ AFLAGS_MODULE =
LDFLAGS_MODULE =
CFLAGS_KERNEL =
AFLAGS_KERNEL =
-CFLAGS_GCOV = -fprofile-arcs -ftest-coverage
+CFLAGS_GCOV = -fprofile-arcs -ftest-coverage -fno-tree-loop-im
# Use USERINCLUDE when you must reference the UAPI directories only.