]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.14.111/h8300-use-cc-cross-prefix-instead-of-hardcoding-h830.patch
Linux 4.14.111
[thirdparty/kernel/stable-queue.git] / releases / 4.14.111 / h8300-use-cc-cross-prefix-instead-of-hardcoding-h830.patch
CommitLineData
04fd09d4
SL
1From 419d53935ba421921c5a7f22ff30ff6d9caf8b17 Mon Sep 17 00:00:00 2001
2From: Masahiro Yamada <yamada.masahiro@socionext.com>
3Date: Fri, 15 Feb 2019 13:04:26 +0900
4Subject: h8300: use cc-cross-prefix instead of hardcoding h8300-unknown-linux-
5
6[ Upstream commit fc2b47b55f17fd996f7a01975ce1c33c2f2513f6 ]
7
8It believe it is a bad idea to hardcode a specific compiler prefix
9that may or may not be installed on a user's system. It is annoying
10when testing features that should not require compilers at all.
11
12For example, mrproper, headers_install, etc. should work without
13any compiler.
14
15They look like follows on my machine.
16
17$ make ARCH=h8300 mrproper
18./scripts/gcc-version.sh: line 26: h8300-unknown-linux-gcc: command not found
19./scripts/gcc-version.sh: line 27: h8300-unknown-linux-gcc: command not found
20make: h8300-unknown-linux-gcc: Command not found
21make: h8300-unknown-linux-gcc: Command not found
22 [ a bunch of the same error messages continue ]
23
24$ make ARCH=h8300 headers_install
25./scripts/gcc-version.sh: line 26: h8300-unknown-linux-gcc: command not found
26./scripts/gcc-version.sh: line 27: h8300-unknown-linux-gcc: command not found
27make: h8300-unknown-linux-gcc: Command not found
28 HOSTCC scripts/basic/fixdep
29make: h8300-unknown-linux-gcc: Command not found
30 WRAP arch/h8300/include/generated/uapi/asm/kvm_para.h
31 [ snip ]
32
33The solution is to delete this line, or to use cc-cross-prefix like
34some architectures do. I chose the latter as a moderate fixup.
35
36I added an alternative 'h8300-linux-' because it is available at:
37
38https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/8.1.0/
39
40Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
41Signed-off-by: Sasha Levin <sashal@kernel.org>
42---
43 arch/h8300/Makefile | 2 +-
44 1 file changed, 1 insertion(+), 1 deletion(-)
45
46diff --git a/arch/h8300/Makefile b/arch/h8300/Makefile
47index e1c02ca230cb..073bba6f9f60 100644
48--- a/arch/h8300/Makefile
49+++ b/arch/h8300/Makefile
50@@ -23,7 +23,7 @@ KBUILD_AFLAGS += $(aflags-y)
51 LDFLAGS += $(ldflags-y)
52
53 ifeq ($(CROSS_COMPILE),)
54-CROSS_COMPILE := h8300-unknown-linux-
55+CROSS_COMPILE := $(call cc-cross-prefix, h8300-unknown-linux- h8300-linux-)
56 endif
57
58 core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/
59--
602.19.1
61