Skip to content

Commit 829fe4a

Browse files
bwhacksKAGA-KOKO
authored andcommitted
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: e501ce9 ("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
1 parent 342db04 commit 829fe4a

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

arch/x86/Makefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,6 @@ ifdef CONFIG_FUNCTION_GRAPH_TRACER
175175
endif
176176
endif
177177

178-
ifndef CC_HAVE_ASM_GOTO
179-
$(error Compiler lacks asm-goto support.)
180-
endif
181-
182178
ifeq ($(ACCUMULATE_OUTGOING_ARGS), 1)
183179
# This compiler flag is not supported by Clang:
184180
KBUILD_CFLAGS += $(call cc-option,-maccumulate-outgoing-args,)
@@ -300,6 +296,13 @@ PHONY += vdso_install
300296
vdso_install:
301297
$(Q)$(MAKE) $(build)=arch/x86/entry/vdso $@
302298

299+
archprepare: checkbin
300+
checkbin:
301+
ifndef CC_HAVE_ASM_GOTO
302+
@echo Compiler lacks asm-goto support.
303+
@exit 1
304+
endif
305+
303306
archclean:
304307
$(Q)rm -rf $(objtree)/arch/i386
305308
$(Q)rm -rf $(objtree)/arch/x86_64

0 commit comments

Comments
 (0)