Subject: port-pmax/17874: pmax USETOOLS=no kernel builds fail due to elf2ecoff
To: None <>
From: None <jhawk@MIT.EDU>
List: netbsd-bugs
Date: 08/06/2002 14:05:23
>Number:         17874
>Category:       port-pmax
>Synopsis:       pmax USETOOLS=no kernel builds fail due to elf2ecoff
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    port-pmax-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Aug 07 11:19:00 PDT 2002
>Originator:     John Hawkinson
>Release:        NetBSD 1.6_BETA5
System: NetBSD NetBSD 1.6_BETA5 (PHANTOM) #0: Tue Aug  6 07:03:41 EDT 2002 pmax
Architecture: mipsel
Machine: pmax
kernel builds with the native toolchain fail due to mk file lossage surrounding

phantom# pwd
phantom# tail make.out
ld -T ../../../../arch/mips/conf/kern.ldscript -Ttext 0x80030000 -e start -EL -G 0 --oformat elf32-littlemips -x -o netbsd ${SYSTEM_OBJ} vers.o
text    data    bss     dec     hex     filename
2521580 64144   432772  3018496 2e0f00  netbsd
netbsd netbsd.ecoff
netbsd: not found
chmod: netbsd.ecoff: No such file or directory
*** Error code 1

make: stopped in /usr/src/sys/arch/pmax/compile/PHANTOM

Apparently that's because has:

                echo ${ELF2ECOFF} $@ $@.ecoff; ${ELF2ECOFF} $@ $@.ecoff; \
                chmod 755 $@.ecoff

And ELF2ECOFF is not defined. The kernel build Makefile includes, which only defines ELF2ECOFF when USETOOLS=yes. Now, does define ELF2ECOFF, but that doesn't help us here.

Try to compile a kernel natively without any USETOOLS specifications.
I'm not terribly USETOOLS-saavy. This fix appears to work.
Could someone verify its correctness, please?

--- sys/conf/	2002/08/06 17:53:22	1.1
+++ sys/conf/	2002/08/06 17:53:48
@@ -29,6 +29,7 @@
 OBJDUMP?=	objdump
 CSCOPE?=	cscope
 MKID?=		mkid
+ELF2ECOFF?=	elf2ecoff
 .MAKEOVERRIDES+=USETOOLS	# make sure proper value is propagated