diff options
author | Jacob Garber <jgarber1@ualberta.ca> | 2019-09-25 13:30:25 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-09-08 21:39:41 +0000 |
commit | 45ddfdd402f3997c2108c6c945bd497c9f863e81 (patch) | |
tree | 58a11a6196e997542a22ce77488048b172c6d2e3 | |
parent | eb4dccd440e59ce4ad3854d4b157fde9c40915ac (diff) | |
download | chrome-ec-45ddfdd402f3997c2108c6c945bd497c9f863e81.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.
Conflicts:
Makefile.toolchain: Just modify COMMON_WARN.
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>
(cherry picked from commit 344f19b1c150d0a3fc5f88b45735ab5910c16783)
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3128745
Reviewed-by: JuHyun Kim <jkim@invensense.com>
Tested-by: JuHyun Kim <jkim@invensense.com>
-rw-r--r-- | Makefile.toolchain | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/Makefile.toolchain b/Makefile.toolchain index 7cb8e212d1..23161d7bfd 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 + CFLAGS_WARN = $(COMMON_WARN) $(C_WARN) CXXFLAGS_WARN = $(COMMON_WARN) CFLAGS_DEBUG= -g |