diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2018-08-29 15:43:17 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2018-08-31 11:08:22 -0400 |
commit | 829fe4aa9ac16417a904ad1de1307de906854bcf (patch) | |
tree | 88ce51cc7bcf33e82882aec78a7f2e2350a7608e | |
parent | 342db04ae71273322f0011384a9ed414df8bdae4 (diff) |
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: e501ce957a78 ("x86: Force asm-goto")
Reported-by: Helmut Grohne <helmutg@debian.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/20180829194317.GA4765@decadent.org.uk
-rw-r--r-- | arch/x86/Makefile | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 8fc8f94ef5f5..8f6e7eb8ae9f 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile | |||
@@ -175,10 +175,6 @@ ifdef CONFIG_FUNCTION_GRAPH_TRACER | |||
175 | endif | 175 | endif |
176 | endif | 176 | endif |
177 | 177 | ||
178 | ifndef CC_HAVE_ASM_GOTO | ||
179 | $(error Compiler lacks asm-goto support.) | ||
180 | endif | ||
181 | |||
182 | ifeq ($(ACCUMULATE_OUTGOING_ARGS), 1) | 178 | ifeq ($(ACCUMULATE_OUTGOING_ARGS), 1) |
183 | # This compiler flag is not supported by Clang: | 179 | # This compiler flag is not supported by Clang: |
184 | KBUILD_CFLAGS += $(call cc-option,-maccumulate-outgoing-args,) | 180 | KBUILD_CFLAGS += $(call cc-option,-maccumulate-outgoing-args,) |
@@ -300,6 +296,13 @@ PHONY += vdso_install | |||
300 | vdso_install: | 296 | vdso_install: |
301 | $(Q)$(MAKE) $(build)=arch/x86/entry/vdso $@ | 297 | $(Q)$(MAKE) $(build)=arch/x86/entry/vdso $@ |
302 | 298 | ||
299 | archprepare: checkbin | ||
300 | checkbin: | ||
301 | ifndef CC_HAVE_ASM_GOTO | ||
302 | @echo Compiler lacks asm-goto support. | ||
303 | @exit 1 | ||
304 | endif | ||
305 | |||
303 | archclean: | 306 | archclean: |
304 | $(Q)rm -rf $(objtree)/arch/i386 | 307 | $(Q)rm -rf $(objtree)/arch/i386 |
305 | $(Q)rm -rf $(objtree)/arch/x86_64 | 308 | $(Q)rm -rf $(objtree)/arch/x86_64 |