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/19/1999 14:05:08
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--------------76A3EDD7E2610B9C45F5AA9E
Content-Type: TEXT/PLAIN; CHARSET=us-ascii
Content-ID: <Pine.SOL.3.96.991119134532.14216D@marcy.nas.nasa.gov>

On Fri, 19 Nov 1999, Shawn Pearce wrote:

> Bill Studenmund wrote:
> 
> > On Thu, 18 Nov 1999, Shawn Pearce wrote:
> >
> > > I just downloaded and attempted to build the NetBSD port of MacPPC from
> > > the 1.4.1 distribution.  However, after getting make, config, lorder and
> > > getting a ppcmake script I found off the web all installed (not to
> > > mention a working powerpc-netbsd-gcc), the NetBSD kernel wouldn't link
> > > because of undefined symbols.  These were:

This is with the 1.4.1 NetBSD make?

> > What does this ppcmake script look like?
> 
> I attached into this email.  I should have been more specific about it
> earlier, but it sets the environment variables up for my cross compiler
> toolchain as well as to use bsdmake (instead of the default GNU make we have
> here).  It also does set MACHINE and MACHINE_ARCH as you suggseted in your
> email.

Looks fine.

> These object files were not compiled without applying the patch I had
> attached to my prior email first.  I couldn't find any reference to how they
> should have been built without that patch, hence my inquiry to the mailing
> list regarding it.  ;-)
> 
> Should I be using a different version of the netbsd kernel?

Nope. The 1.4.1 version should work.

> > You should have (csh syntax):
> > setenv MACHINE macppc
> > setenv MACHINE_ARCH powerpc
> 
> Already set via the ppcmake script I'm using.  (See attached)

I saw that. Very strange. It looks like it should be working.

The way these files get built is that the kernel's Makefile includes
libkern's make file with this line:

.include "$S/lib/libkern/Makefile.inc"

This include file adds some rules to the make process, including one which
will fork off a copy of make to actually make the library. That make will
define a variable M, and use it to find the powerpc-specific includes:

ARCHSUBDIR= ${MACHINE_ARCH:C/mipse[bl]/mips/}
M= ${.CURDIR}/arch/${ARCHSUBDIR}

CPPFLAGS=       -I$M ${KERNCPPFLAGS} ${KERNMISCCPPFLAGS}

.if exists ($M/Makefile.inc)
.PATH:  $M
.include "$M/Makefile.inc"
.endif

So sys/lib/kern/arch/powerpc/Makefile.inc isn't getting found.

I don't understand why.

Take care,

Bill

--------------76A3EDD7E2610B9C45F5AA9E--