public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/boot: Disable warnings about GNU extensions
@ 2017-10-30 19:43 Matthias Kaehlcke
  2017-10-31 12:05 ` [tip:x86/boot] x86/boot: Disable Clang " tip-bot for Matthias Kaehlcke
  0 siblings, 1 reply; 2+ messages in thread
From: Matthias Kaehlcke @ 2017-10-30 19:43 UTC (permalink / raw)
  To: H . Peter Anvin, Thomas Gleixner, Ingo Molnar
  Cc: x86, linux-kernel, Nick Desaulniers, Douglas Anderson,
	Guenter Roeck, Matthias Kaehlcke

The kernel makes use of several GCC extensions, disable clang warnings
about that in the boot code, as we already do for the rest of the kernel.

This suppresses the following warning when building with clang:

  ./include/linux/cgroup-defs.h:391:16: warning: field 'cgrp' with
  variable sized type 'struct cgroup' not at the end of a struct or
  class is a GNU extension
  [-Wgnu-variable-sized-type-not-at-end]
        struct cgroup cgrp;

Reported-by: Nick Desaulniers <nick.desaulniers@gmail.com>
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
 arch/x86/boot/compressed/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
index 8a958274b54c..65a150a7f15c 100644
--- a/arch/x86/boot/compressed/Makefile
+++ b/arch/x86/boot/compressed/Makefile
@@ -35,6 +35,7 @@ KBUILD_CFLAGS += -mno-mmx -mno-sse
 KBUILD_CFLAGS += $(call cc-option,-ffreestanding)
 KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector)
 KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
+KBUILD_CFLAGS += $(call cc-disable-warning, gnu)
 
 KBUILD_AFLAGS  := $(KBUILD_CFLAGS) -D__ASSEMBLY__
 GCOV_PROFILE := n
-- 
2.15.0.rc2.357.g7e34df9404-goog

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-10-31 12:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-30 19:43 [PATCH] x86/boot: Disable warnings about GNU extensions Matthias Kaehlcke
2017-10-31 12:05 ` [tip:x86/boot] x86/boot: Disable Clang " tip-bot for Matthias Kaehlcke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox