linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] h8300: use cc-cross-prefix instead of hardcoding h8300-unknown-linux-
@ 2019-02-15  4:04 Masahiro Yamada
  2019-03-13 17:28 ` Masahiro Yamada
  0 siblings, 1 reply; 2+ messages in thread
From: Masahiro Yamada @ 2019-02-15  4:04 UTC (permalink / raw)
  To: Yoshinori Sato, uclinux-h8-devel; +Cc: Masahiro Yamada, linux-kernel

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>
---

 arch/h8300/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/h8300/Makefile b/arch/h8300/Makefile
index f801f37..ba0f26c 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.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] h8300: use cc-cross-prefix instead of hardcoding h8300-unknown-linux-
  2019-02-15  4:04 [PATCH] h8300: use cc-cross-prefix instead of hardcoding h8300-unknown-linux- Masahiro Yamada
@ 2019-03-13 17:28 ` Masahiro Yamada
  0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2019-03-13 17:28 UTC (permalink / raw)
  To: Yoshinori Sato, moderated list:H8/300 ARCHITECTURE
  Cc: Linux Kernel Mailing List

On Fri, Feb 15, 2019 at 11:53 PM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> 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>
> ---

This is more related to build system.
So, I applied to linux-kbuild now.





>  arch/h8300/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/h8300/Makefile b/arch/h8300/Makefile
> index f801f37..ba0f26c 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.7.4
>


-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-03-13 17:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-15  4:04 [PATCH] h8300: use cc-cross-prefix instead of hardcoding h8300-unknown-linux- Masahiro Yamada
2019-03-13 17:28 ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).