From 344f19b1c150d0a3fc5f88b45735ab5910c16783 Mon Sep 17 00:00:00 2001 From: Jacob Garber Date: Wed, 25 Sep 2019 13:30:25 -0600 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1826289 Reviewed-by: Daisuke Nojiri --- Makefile.toolchain | 11 ++++------- 1 file 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 -- cgit v1.2.1