Subject: Re: Undefined kernel symbols: bcopy, strchr, memset, etc
To: Shawn Pearce <shawnp@nortelnetworks.com>
From: Bill Studenmund <wrstuden@nas.nasa.gov>
List: port-macppc
Date: 11/22/1999 17:23:08
On Mon, 22 Nov 1999, Shawn Pearce wrote:

> > So sys/lib/kern/arch/powerpc/Makefile.inc isn't getting found.
> 
> I see that.  I narrowed the problem down to the line:
> 
>     ARCHSUBDIR= ${MACHINE_ARCH:C/mipse[bl]/mips/}
> 
> This line causes ARCHSUBDIR to be set to '' (empty string) even though
> MACHINE_ARCH is set to powerpc.  Changing it to:
> 
>     ARCHSUBDIR=${MACHINE_ARCH}

Strange. Christos? Any ideas what's up?

> It gets a lot farther.  bcopy is still undefined, but its the _only_ undefined.
> Adding bcopy.c to sys/lib/kern/arch/powerpc/Makefile.inc fixes this problem and
> my kernel linked completely.

bcopy isn't supposed to be defined. I think the problem is that the gcc
you're using to cross-compile is configured a bit differently than the gcc
in NetBSD. We've moved to using mem* functions for everything, rather than
b* routines. In fact, sys/sys/system.h defines:

#define bcopy(src, dst, len)   memcpy(dst, src, len)

I bet gcc is using bcopy internally. :-(

> So why is my bsdmake (from the 1.4.1 distribution) producing an empty string for
> ARCHSUBDIR?

Good question. I don't know.

Take care,

Bill