Subject: Re: Unable to build custom ramdisk / floppies
To: Daniel Eggert <danieleggert@mac.com>
From: Daniel Eggert <danieleggert@mac.com>
List: netbsd-help
Date: 09/03/2002 10:57:18
On tirsdag, sep 3, 2002, at 09:11 Europe/Copenhagen, Daniel Eggert 
wrote:

> Hi all,
>
> I'm still trying to build a custom INSTALL kernel with a md(4) image. 
> I've done this before on 1.5.3, but now I'm running NetBSD 1.6D. I got 
> the source code from CVS a few days ago. When I try to build the 
> floppies I get:
> 	[pingvin:~] eggert# cd /usr/src/distrib/macppc/floppies/
> 	[pingvin:distrib/macppc/floppies] eggert# make
> 	all ===> ramdisk
> 	/usr/src/tools/tools.NetBSD-1.6D-powerpc/bin/powerpc--netbsd-gcc -Os 
> -mmultiple -mstring  -Wall -Wstrict-prototypes -Wmissing-prototypes 
> -Wpointer-arith -Wno-uninitialized  -Werror  -nostdinc -isystem 
> /usr/include  -c /usr/src/distrib/utils/libhack/getcap.c
> 	make: 
> exec(/usr/src/tools/tools.NetBSD-1.6D-powerpc/bin/powerpc--netbsd-gcc) 
> failed (No such file or directory)
> 	*** Error code 1
> I can't find anything like this dir myself.
>
> Should I change the floppies/Makefile? If so, to what?

It appear to me, that this has something to do with 
/usr/share/mk/bsd.own.mk
In this file on lines 90-95 I've got:
	# Provide a default for TOOLDIR.
	.if !defined(TOOLDIR)
	_TOOLOBJ!=      cd ${NETBSDSRCDIR}/tools && ${PRINTOBJDIR}
	TOOLDIR:=       ${_TOOLOBJ}/tools.${HOST_OSTYPE}
	.MAKEOVERRIDES+= TOOLDIR
	.endif
and on lines 110-116:
.if ${USETOOLS_GCC:Uyes} == "yes"
	CC=             ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc
	CPP=            ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-cpp
	CXX=            ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-c++
	FC=             ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-g77
	OBJC=           ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc
	.endif
Does this make any sense?

Why does make not simply use /usr/bin/gcc?

Daniel