Skip to content

Commit 6c3b56b

Browse files
Matthias KaehlckeIngo Molnar
authored andcommitted
x86/boot: Disable Clang warnings about GNU extensions
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> Acked-by: Thomas Gleixner <tglx@linutronix.de> Cc: Douglas Anderson <dianders@chromium.org> Cc: Guenter Roeck <groeck@chromium.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20171030194351.122090-1-mka@chromium.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent dc0fdf7 commit 6c3b56b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/x86/boot/compressed/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ KBUILD_CFLAGS += -mno-mmx -mno-sse
3535
KBUILD_CFLAGS += $(call cc-option,-ffreestanding)
3636
KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector)
3737
KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member)
38+
KBUILD_CFLAGS += $(call cc-disable-warning, gnu)
3839

3940
KBUILD_AFLAGS := $(KBUILD_CFLAGS) -D__ASSEMBLY__
4041
GCOV_PROFILE := n

0 commit comments

Comments
 (0)