mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javier@osg.samsung.com>
To: linux-kernel@vger.kernel.org
Cc: Javier Martinez Canillas <javier@osg.samsung.com>,
	Yoshinori Sato <ysato@users.sourceforge.jp>,
	uclinux-h8-devel@lists.sourceforge.jp
Subject: [PATCH] h8300: Don't set CROSS_COMPILE unconditionally
Date: Fri, 16 Oct 2015 13:31:27 +0200	[thread overview]
Message-ID: <1444995087-11997-1-git-send-email-javier@osg.samsung.com> (raw)

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 <javier@osg.samsung.com>

---

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

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


             reply	other threads:[~2015-10-16 11:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-16 11:31 Javier Martinez Canillas [this message]
2015-10-21 14:55 ` Yoshinori Sato
2015-10-21 15:01   ` Javier Martinez Canillas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1444995087-11997-1-git-send-email-javier@osg.samsung.com \
    --to=javier@osg.samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=uclinux-h8-devel@lists.sourceforge.jp \
    --cc=ysato@users.sourceforge.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®