summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Garber <jgarber1@ualberta.ca>2019-09-25 13:30:25 -0600
committerCommit Bot <commit-bot@chromium.org>2019-09-27 02:21:12 +0000
commit344f19b1c150d0a3fc5f88b45735ab5910c16783 (patch)
treea0d25ab19e07f143f60c5fb4f44f436c314aa6e5
parent36b47ab3c06e477f5e95d6d9e84a5220248784e6 (diff)
downloadchrome-ec-344f19b1c150d0a3fc5f88b45735ab5910c16783.tar.gz
Makefile: Ignore -Waddress-of-packed-member for GCC
GCC 9 enabled the -Waddress-of-packed-member warning by default, which causes the build to fail. This is already ignored for Clang, so do the same for GCC. Tidy up the organization of the flags while we're at it. BUG=none BRANCH=none TEST=make buildall -j Change-Id: I8796b268503c9fef2be9336ee01beaf5309024f6 Signed-off-by: Jacob Garber <jgarber1@ualberta.ca> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1826289 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
-rw-r--r--Makefile.toolchain11
1 files changed, 4 insertions, 7 deletions
diff --git a/Makefile.toolchain b/Makefile.toolchain
index f1a5a4d3a2..49a453d1a0 100644
--- a/Makefile.toolchain
+++ b/Makefile.toolchain
@@ -45,13 +45,10 @@ HOSTCXX?=$(CCACHE) $(HOST_CROSS_COMPILE)g++
PROTOC?=protoc
C_WARN = -Wstrict-prototypes -Wdeclaration-after-statement -Wno-pointer-sign
-COMMON_WARN = -Wall -Werror -Wundef -Wno-trigraphs -fno-strict-aliasing \
- -fno-common -Werror-implicit-function-declaration \
- -Wno-format-security -fno-strict-overflow
-ifeq ($(cc-name),clang)
-# clang is pickier when it comes to packed struct members alignment.
-C_WARN+= -Wno-address-of-packed-member
-endif
+COMMON_WARN = -Wall -Wundef -Werror -Werror-implicit-function-declaration \
+ -Wno-trigraphs -Wno-format-security -Wno-address-of-packed-member \
+ -fno-common -fno-strict-aliasing -fno-strict-overflow
+
UBSAN_FLAGS=-fsanitize=array-bounds,vla-bound \
-fno-sanitize=vptr \
-fno-sanitize-recover=all