lkml.org 
[lkml]   [2018]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] 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>
    ---
    arch/x86/Makefile | 11 +++++++----
    1 file changed, 7 insertions(+), 4 deletions(-)

    diff --git a/arch/x86/Makefile b/arch/x86/Makefile
    index 94859241bc3e..7df47ff45f68 100644
    --- a/arch/x86/Makefile
    +++ b/arch/x86/Makefile
    @@ -175,10 +175,6 @@ ifdef CONFIG_FUNCTION_GRAPH_TRACER
    endif
    endif

    -ifndef CC_HAVE_ASM_GOTO
    - $(error Compiler lacks asm-goto support.)
    -endif
    -
    #
    # Jump labels need '-maccumulate-outgoing-args' for gcc < 4.5.2 to prevent a
    # GCC bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46226). There's no way
    @@ -312,6 +308,13 @@ PHONY += vdso_install
    vdso_install:
    $(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:
    $(Q)rm -rf $(objtree)/arch/i386
    $(Q)rm -rf $(objtree)/arch/x86_64[unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2018-08-29 21:44    [W:2.304 / U:1.296 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site