Vesa Akseli Norrman | 25 Apr 2002 17:38
Picon
Picon

cross compilation

Hello, can you help me with cross compile... I compile on i386 with
settings, most important:
setenv MACHINE hpcsh
setenv MACHINE_ARCH sh3el
setenv USETOOLS yes
setenv USE_NEW_TOOLCHAIN yes

build.sh is going fine (I remove sed from makefile because it doesn't
compile). I compile kernel by doing:
config GENERIC
cd ../compile/GENERIC
make depend
make

Is this the correct procedure? Linker is giving troubles:

/usr/src/tools/obj/tools.NetBSD-1.5ZA-i386/bin/shle--netbsdelf-ld -T
../../../../arch/hpcsh/conf/shl-elf.x -e start -S -o netbsd ${SYSTEM_OBJ} vers.o
/usr/src/tools/obj/tools.NetBSD-1.5ZA-i386/bin/shle--netbsdelf-ld: target elf32-shl-unx not found
*** Error code 1

Stop.
make: stopped in /usr/src/sys/arch/hpcsh/compile/GENERIC

Do you know how to solve this problem? I think it isn't even supposed to
work totally fine because I defined manually USE_NEW_TOOLCHAIN=yes, but
any suggestion would be nice. Also, kernel build automatically used my
cross tools???, it's very good but how can kernel makefile know...
Vesa

(Continue reading)

UCHIYAMA Yasushi | 25 Apr 2002 19:12
Favicon

Re: cross compilation

 | /usr/src/tools/obj/tools.NetBSD-1.5ZA-i386/bin/shle--netbsdelf-ld -T
../../../../arch/hpcsh/conf/shl-elf.x -e start -S -o netbsd ${SYSTEM_OBJ} vers.o
 | /usr/src/tools/obj/tools.NetBSD-1.5ZA-i386/bin/shle--netbsdelf-ld: target elf32-shl-unx not found
 | *** Error code 1

I've commited following patch. This solves it.
---
UCHIYAMA Yasushi
uch <at> vnop.net

Index: shl-elf.x
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/hpcsh/conf/shl-elf.x,v
retrieving revision 1.5
diff -u -r1.5 shl-elf.x
--- shl-elf.x	2002/03/02 22:26:26	1.5
+++ shl-elf.x	2002/04/25 16:51:19
 <at>  <at>  -1,6 +1,6  <at>  <at> 
 /*	$NetBSD: shl-elf.x,v 1.5 2002/03/02 22:26:26 uch Exp $	*/

-OUTPUT_FORMAT("elf32-shl-unx")
+OUTPUT_FORMAT("elf32-shl-nbsd")
 OUTPUT_ARCH(sh)
 ENTRY(start)


Gmane