From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754881AbbJUOzO (ORCPT ); Wed, 21 Oct 2015 10:55:14 -0400 Received: from mail2.asahi-net.or.jp ([202.224.39.198]:42874 "EHLO mail2.asahi-net.or.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754476AbbJUOzM (ORCPT ); Wed, 21 Oct 2015 10:55:12 -0400 Date: Wed, 21 Oct 2015 23:55:09 +0900 Message-ID: <87r3ko46gi.wl-ysato@users.sourceforge.jp> From: Yoshinori Sato To: Javier Martinez Canillas Cc: linux-kernel@vger.kernel.org, uclinux-h8-devel@lists.sourceforge.jp Subject: Re: [PATCH] h8300: Don't set CROSS_COMPILE unconditionally In-Reply-To: <1444995087-11997-1-git-send-email-javier@osg.samsung.com> References: <1444995087-11997-1-git-send-email-javier@osg.samsung.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.8 EasyPG/1.0.0 Emacs/24.5 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 16 Oct 2015 20:31:27 +0900, Javier Martinez Canillas wrote: > > The h8300 architecture Makefile sets the CROSS_COMPILE variable to > "h8300-unknown-linux-" unconditionally but doing that prevents the > variable to be used if a toolchain with a different binary name is > installed in the machine. > > So only set CROSS_COMPILE to that default if the variable has not > been set by the user before. > > Signed-off-by: Javier Martinez Canillas > > --- > > Hello, > > After $SUBJECT, I'm able to build using the toolchain installed by > my Linux distribution but the linker gives me an error about an > unrecognised emulation mode: > > h8300-linux-gnu-ld: unrecognised emulation mode: h8300helf_linux > > I see that h8300helf_linux and 8300self_linux are hardcoded in the > Makefile as well and these are not listed as supported emulations: > > Supported emulations: h8300elf h8300helf h8300self h8300hnelf h8300snelf h8300sxelf h8300sxnelf > > I tried changing -mh8300helf_linux for -mh8300helf that is listed > as a supported emulation but then I got the following error: > > h8300-linux-gnu-ld: cannot open linker script file ldscripts/h8300helf.xr: No such file or directory > h8300-linux is alias of h8300-*-elf. kernel building toolchain is h8300-*-linux. h8300-*-linux toolchain is already merged for trunk. But not include latest release. Backported patch is https://osdn.jp/projects/uclinux-h8/releases/p14625 > Best regards, > Javier > > arch/h8300/Makefile | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/h8300/Makefile b/arch/h8300/Makefile > index 0d2d96e52d9f..e1c02ca230cb 100644 > --- a/arch/h8300/Makefile > +++ b/arch/h8300/Makefile > @@ -22,7 +22,9 @@ KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\" > KBUILD_AFLAGS += $(aflags-y) > LDFLAGS += $(ldflags-y) > > +ifeq ($(CROSS_COMPILE),) > CROSS_COMPILE := h8300-unknown-linux- > +endif > > core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ > ifneq '$(CONFIG_H8300_BUILTIN_DTB)' '""' > -- > 2.4.3 > Applied. Thanks. -- Yoshinori Sato