Commit 829fe4aa authored by Ben Hutchings's avatar Ben Hutchings Committed by Thomas Gleixner
Browse files

x86: Allow generating user-space headers without a compiler


When bootstrapping an architecture, it's usual to generate the kernel's
user-space headers (make headers_install) before building a compiler.  Move
the compiler check (for asm goto support) to the archprepare target so that
it is only done when building code for the target.

Fixes: e501ce95

 ("x86: Force asm-goto")
Reported-by: default avatarHelmut Grohne <helmutg@debian.org>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20180829194317.GA4765@decadent.org.uk
parent 342db04a
...@@ -175,10 +175,6 @@ ifdef CONFIG_FUNCTION_GRAPH_TRACER ...@@ -175,10 +175,6 @@ ifdef CONFIG_FUNCTION_GRAPH_TRACER
endif endif
endif endif
ifndef CC_HAVE_ASM_GOTO
$(error Compiler lacks asm-goto support.)
endif
ifeq ($(ACCUMULATE_OUTGOING_ARGS), 1) ifeq ($(ACCUMULATE_OUTGOING_ARGS), 1)
# This compiler flag is not supported by Clang: # This compiler flag is not supported by Clang:
KBUILD_CFLAGS += $(call cc-option,-maccumulate-outgoing-args,) KBUILD_CFLAGS += $(call cc-option,-maccumulate-outgoing-args,)
...@@ -300,6 +296,13 @@ PHONY += vdso_install ...@@ -300,6 +296,13 @@ PHONY += vdso_install
vdso_install: vdso_install:
$(Q)$(MAKE) $(build)=arch/x86/entry/vdso $@ $(Q)$(MAKE) $(build)=arch/x86/entry/vdso $@
archprepare: checkbin
checkbin:
ifndef CC_HAVE_ASM_GOTO
@echo Compiler lacks asm-goto support.
@exit 1
endif
archclean: archclean:
$(Q)rm -rf $(objtree)/arch/i386 $(Q)rm -rf $(objtree)/arch/i386
$(Q)rm -rf $(objtree)/arch/x86_64 $(Q)rm -rf $(objtree)/arch/x86_64
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment