public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/boot: define CC_HAVE_ASM_GOTO
@ 2018-09-07 20:26 Nick Desaulniers
  2018-09-25 18:41 ` Nick Desaulniers
  0 siblings, 1 reply; 8+ messages in thread
From: Nick Desaulniers @ 2018-09-07 20:26 UTC (permalink / raw)
  To: tglx, mingo
  Cc: Nick Desaulniers, H. Peter Anvin, x86, Kirill A. Shutemov,
	Masahiro Yamada, Borislav Petkov, Matthias Kaehlcke, Kees Cook,
	Cao jin, linux-kernel

Since this file steamrolls KBUILD_CFLAGS, we have to redefine these
symbols. This will prevent warnings in source files in this directory
when Clang supports asm goto.

Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
---
 arch/x86/boot/compressed/Makefile | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile
index 28764dacf018..158c0b4e178a 100644
--- a/arch/x86/boot/compressed/Makefile
+++ b/arch/x86/boot/compressed/Makefile
@@ -56,6 +56,13 @@ KBUILD_LDFLAGS += $(shell $(LD) --help 2>&1 | grep -q "\-z noreloc-overflow" \
 endif
 LDFLAGS_vmlinux := -T
 
+# check for 'asm goto'
+ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC) $(KBUILD_CFLAGS)), y)
+  CC_HAVE_ASM_GOTO := 1
+  KBUILD_CFLAGS += -DCC_HAVE_ASM_GOTO
+  KBUILD_AFLAGS += -DCC_HAVE_ASM_GOTO
+endif
+
 hostprogs-y	:= mkpiggy
 HOST_EXTRACFLAGS += -I$(srctree)/tools/include
 
-- 
2.19.0.rc2.392.g5ba43deb5a-goog


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

end of thread, other threads:[~2018-09-28 20:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-07 20:26 [PATCH] x86/boot: define CC_HAVE_ASM_GOTO Nick Desaulniers
2018-09-25 18:41 ` Nick Desaulniers
2018-09-25 19:08   ` Borislav Petkov
2018-09-25 21:08     ` Nick Desaulniers
2018-09-25 21:13       ` Nick Desaulniers
2018-09-26  9:08         ` Borislav Petkov
2018-09-28 20:41           ` H. Peter Anvin
2018-09-26  8:56       ` Borislav Petkov

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