mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiang Liu <liuj97@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Jiang Liu <jiang.liu@huawei.com>,
	Yoshinori Sato <ysato@users.sourceforge.jp>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] h8300: fix CROSS_COMPILE setting in arch/h8300/Makefile
Date: Fri, 22 Mar 2013 00:31:43 +0800	[thread overview]
Message-ID: <1363883504-6140-1-git-send-email-jiang.liu@huawei.com> (raw)

Makefiles for h8300 architecture unconditionally sets CROSS_COMPILE
to a default value, which breaks following cross compilation command:
ARCH=h8300 CROSS_COMPILE=/ws/tool/h8300-elf/bin/h8300-elf- make arch/h8300/mm/init.o
make: h8300-elf-gcc: Command not found
make: h8300-elf-gcc: Command not found
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CC      kernel/bounds.s
/bin/sh: 1: h8300-elf-gcc: not found
make[1]: *** [kernel/bounds.s] Error 127
make: *** [prepare0] Error 2

So only set CROSS_COMPILE to the default value if it's has been set yet.

Also fix a typo in arch/h8300/Makefile to change "CROSS-COMPILE" to
"CROSS_COMPILE".

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-kernel@vger.kernel.org
---
 arch/h8300/Makefile |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/h8300/Makefile b/arch/h8300/Makefile
index a556447..93d693d 100644
--- a/arch/h8300/Makefile
+++ b/arch/h8300/Makefile
@@ -38,8 +38,10 @@ KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\"
 KBUILD_AFLAGS += -DPLATFORM=$(PLATFORM) -DMODEL=$(MODEL) $(cflags-y)
 LDFLAGS += $(ldflags-y)
 
-CROSS_COMPILE = h8300-elf-
-LIBGCC := $(shell $(CROSS-COMPILE)$(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
+ifeq ($(CROSS_COMPILE),)
+	CROSS_COMPILE := h8300-elf-
+endif
+LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
 
 head-y := arch/$(ARCH)/platform/$(PLATFORM)/$(BOARD)/crt0_$(MODEL).o
 
-- 
1.7.9.5


             reply	other threads:[~2013-03-21 16:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-21 16:31 Jiang Liu [this message]
2013-03-21 16:31 ` [PATCH 2/2] h8300: add missing definition for read_barries_depends() Jiang Liu

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=1363883504-6140-1-git-send-email-jiang.liu@huawei.com \
    --to=liuj97@gmail.com \
    --cc=geert@linux-m68k.org \
    --cc=jiang.liu@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --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®