summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-05-01 11:05:41 -0700
committerSeung-Woo Kim <sw0312.kim@samsung.com>2019-12-30 11:10:52 +0900
commit691680fbd3d24d419e10bfc2d4ca8afc8a4df7f4 (patch)
tree82099c8096de9b91ba3f9d613da9548c9a040f15
parenteebf6ad4295e729603416ab8189470e22aadf4b0 (diff)
downloadlinux-artik7-691680fbd3d24d419e10bfc2d4ca8afc8a4df7f4.tar.gz
linux-artik7-691680fbd3d24d419e10bfc2d4ca8afc8a4df7f4.tar.bz2
linux-artik7-691680fbd3d24d419e10bfc2d4ca8afc8a4df7f4.zip
gcc-9: silence 'address-of-packed-member' warning
commit 6f303d60534c46aa1a239f29c321f95c83dda748 upstream. We already did this for clang, but now gcc has that warning too. Yes, yes, the address may be unaligned. And that's kind of the point. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> [sw0312.kim: cherry-pick from stable linux-4.4.y commit 9efccd7745a1 for gcc 9 build] Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Change-Id: I1a6ea66a5214bed3371e92686b00f870e5c678f0
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 2aa8db459a74..b882e14efd9c 100644
--- a/Makefile
+++ b/Makefile
@@ -636,6 +636,7 @@ KBUILD_CFLAGS += $(call cc-disable-warning,frame-address,)
KBUILD_CFLAGS += $(call cc-disable-warning, format-truncation)
KBUILD_CFLAGS += $(call cc-disable-warning, format-overflow)
KBUILD_CFLAGS += $(call cc-disable-warning, int-in-bool-context)
+KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
KBUILD_CFLAGS += $(call cc-disable-warning, attribute-alias)
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
@@ -712,7 +713,6 @@ ifeq ($(cc-name),clang)
KBUILD_CPPFLAGS += $(call cc-option,-Qunused-arguments,)
KBUILD_CFLAGS += $(call cc-disable-warning, format-invalid-specifier)
KBUILD_CFLAGS += $(call cc-disable-warning, gnu)
-KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
# Quiet clang warning: comparison of unsigned expression < 0 is always false
KBUILD_CFLAGS += $(call cc-disable-warning, tautological-compare)
# CLANG uses a _MergedGlobals as optimization, but this breaks modpost, as the