summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2019-06-06 19:02:26 -0700
committerVadim Bendebury <vbendeb@chromium.org>2019-09-21 19:11:23 -0700
commitcc0f7a00aa8abbfc03b183d6631300e9ce3565b5 (patch)
treeb85624169e0443c8fc28d38a385c84a1c48c4a3b
parentba745de206b3b20513a918ed584c9fb9d6c45111 (diff)
downloadchrome-ec-cc0f7a00aa8abbfc03b183d6631300e9ce3565b5.tar.gz
Makefile: add -ffat-lto-objects to CFLAGS
This command line option causes .o files to include additional information and seems to be triggering a more thorough code analysis. In particular, the uninitalized variable use cases previously missed trigger compilation warnings when this option is enabled. Generated code size for the Cr50 target does not change. BRANCH=cr50, cr50-mp BUG=b:134623681 TEST=make buildall -j Change-Id: I1d916f0e6592757a073ae44e8e38c8a60384d576 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1648924 Reviewed-by: Patrick Georgi <pgeorgi@chromium.org> (cherry picked from commit 9985215ea27b059e83870d4f7f93918ae058c2dd) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1653658 (cherry picked from commit 29a8cbfccbaa4c1e556c687a35a48db29060f6e8) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1705724 (cherry picked from commit f5c4b64d25090fdb0c5b4ad85e5269b58cf0e072)
-rw-r--r--Makefile.toolchain1
1 files changed, 1 insertions, 0 deletions
diff --git a/Makefile.toolchain b/Makefile.toolchain
index 2431ca564e..dcebae1a6f 100644
--- a/Makefile.toolchain
+++ b/Makefile.toolchain
@@ -69,6 +69,7 @@ CPPFLAGS+=-ffreestanding -fno-builtin -nostdinc -nostdlib
CPPFLAGS+=-Ibuiltin/
endif
CFLAGS=$(CPPFLAGS) $(CFLAGS_CPU) $(CFLAGS_DEBUG) $(CFLAGS_WARN) $(CFLAGS_y)
+CFLAGS+= -ffat-lto-objects
CFLAGS+= -ffunction-sections -fshort-wchar
CFLAGS+= -fno-delete-null-pointer-checks -fconserve-stack
CFLAGS+= -DCHROMIUM_EC