Skip to contentSkip to conversation

h8300: fix CROSS_COMPILE setting in arch/h8300/Makefile

PATCH New Jiang Liu 1 participant 2 messages Mar 21, 2013

lore
Share & tools
lore

Jiang Liu

author
#0 lore raw

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

Cc Yoshinori Sato <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
---
 arch/h8300/Makefile |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
arch/h8300/Makefile +4 -2
index a556447..93d693d 100644
@@ -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
 
Signature · 1 line
1.7.9.5
author
#1 lore raw

PATCH 2/2 h8300: add missing definition for read_barries_depends()

Add missing definition for read_barries_depends() for h8300 to fix error:
kernel/task_work.c: In function 'task_work_cancel':
kernel/task_work.c:38:3: error: implicit declaration of function 'read_barrier_depends' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[1]: *** [kernel/task_work.o] Error 1
make: *** [kernel] Error 2

Cc Yoshinori Sato <[email protected]>
Cc David Howells <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
---
 arch/h8300/include/asm/barrier.h |    2 ++
 1 file changed, 2 insertions(+)
arch/h8300/include/asm/barrier.h +2 -0
index c7283c3..9e0aa9f 100644
@@ -12,6 +12,8 @@
 #define wmb()  asm volatile (""   : : :"memory")
 #define set_mb(var, value) do { xchg(&var, value); } while (0)
 
+#define read_barrier_depends()	do { } while (0)
+
 #ifdef CONFIG_SMP
 #define smp_mb()	mb()
 #define smp_rmb()	rmb()
Signature · 1 line
1.7.9.5