lkml.org 
[lkml]   [2019]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 5.0 004/262] h8300: use cc-cross-prefix instead of hardcoding h8300-unknown-linux-
    Date
    From: Masahiro Yamada <yamada.masahiro@socionext.com>

    [ Upstream commit fc2b47b55f17fd996f7a01975ce1c33c2f2513f6 ]

    It believe it is a bad idea to hardcode a specific compiler prefix
    that may or may not be installed on a user's system. It is annoying
    when testing features that should not require compilers at all.

    For example, mrproper, headers_install, etc. should work without
    any compiler.

    They look like follows on my machine.

    $ make ARCH=h8300 mrproper
    ./scripts/gcc-version.sh: line 26: h8300-unknown-linux-gcc: command not found
    ./scripts/gcc-version.sh: line 27: h8300-unknown-linux-gcc: command not found
    make: h8300-unknown-linux-gcc: Command not found
    make: h8300-unknown-linux-gcc: Command not found
    [ a bunch of the same error messages continue ]

    $ make ARCH=h8300 headers_install
    ./scripts/gcc-version.sh: line 26: h8300-unknown-linux-gcc: command not found
    ./scripts/gcc-version.sh: line 27: h8300-unknown-linux-gcc: command not found
    make: h8300-unknown-linux-gcc: Command not found
    HOSTCC scripts/basic/fixdep
    make: h8300-unknown-linux-gcc: Command not found
    WRAP arch/h8300/include/generated/uapi/asm/kvm_para.h
    [ snip ]

    The solution is to delete this line, or to use cc-cross-prefix like
    some architectures do. I chose the latter as a moderate fixup.

    I added an alternative 'h8300-linux-' because it is available at:

    https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/8.1.0/

    Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    arch/h8300/Makefile | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/arch/h8300/Makefile b/arch/h8300/Makefile
    index f801f3708a89..ba0f26cfad61 100644
    --- a/arch/h8300/Makefile
    +++ b/arch/h8300/Makefile
    @@ -27,7 +27,7 @@ KBUILD_LDFLAGS += $(ldflags-y)
    CHECKFLAGS += -msize-long

    ifeq ($(CROSS_COMPILE),)
    -CROSS_COMPILE := h8300-unknown-linux-
    +CROSS_COMPILE := $(call cc-cross-prefix, h8300-unknown-linux- h8300-linux-)
    endif

    core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/
    --
    2.19.1
    \
     
     \ /
      Last update: 2019-03-27 20:35    [W:2.815 / U:1.084 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site