lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1363883504-6140-1-git-send-email-jiang.liu@huawei.com>
Date:	Fri, 22 Mar 2013 00:31:43 +0800
From:	Jiang Liu <liuj97@...il.com>
To:	unlisted-recipients:; (no To-header on input)
Cc:	Jiang Liu <jiang.liu@...wei.com>,
	Yoshinori Sato <ysato@...rs.sourceforge.jp>,
	Geert Uytterhoeven <geert@...ux-m68k.org>,
	linux-kernel@...r.kernel.org
Subject: [PATCH 1/2] h8300: fix CROSS_COMPILE setting in arch/h8300/Makefile

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@...wei.com>
Cc: Yoshinori Sato <ysato@...rs.sourceforge.jp>
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: linux-kernel@...r.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ