Subject: Re: Tell me how to set up my system
To: None <>
From: Rick Byers <>
List: tech-toolchain
Date: 06/26/2001 17:05:12
On Sat, 23 Jun 2001 wrote:

> > >I want to be able to (1) compile kernels and (2) use current versions
> > >the GNU tools and programming languages that I'm used to.
> [...snip...]
> 	egcs 1.1.2 is quite old and I had trouble getting some
> programs to compile - perhaps because of the version or perhaps for
> other reasons. I would like to be able to keep myself in sync with the
> current production versions of the major GNU software (bison, yak,
> GCL, GCC, gmake, etc.)
> [...snip...]
> So all I have to do is go from NetBSD 1.5 to NetBSD -current and
> everything will work? I think what your telling me is:
> 1. Download the kernel sources for NetBSD-current and build a new
> kernel.
> 2. Download the gnu sources, put them in /usr/src and they will build
> successfully. (I'm a little skeptical as I have seen posts about
> various patches needed to get things built for NetBSD).

Ummmm... No.  You probably don't want to mess with NetBSD-current just yet
- and if you do, its not as easy as just "downloading the sources and
building a new kernel".  You just want to build a custom kernel for your
current version of NetBSD (1.5), right?  I think there are instructions
for how to do this on the web, but it basically consists of the following:
 - installing syssrc.tgz (the NetBSD-1.5/powerpc version, not the
   NetBSD-current version) - you should have done this as part of your
   NetBSD install (I think the docs list it as required or strongly
   reccomended).  This gives you all the source (in /usr/src/sys) you
 - Create a kernel config file in /sys/arch/powerpc/conf/MYMACHINE
   which is basically a modified version of GENERIC
 - from /sys/arch/powerpc/conf run "config MYMACHINE"
 - now "cd ../compile/MYMACHINE && make depend && make"
 - then if that all worked - "make install and reboot"

Some gnu sources come with NetBSD (in /usr/src/gnu).  Because NetBSD has a
higher focus on stability and equality among all platforms than being
bleeding-edge, the compiler that is part of NetBSD is still egcs-1.1.2.
I believe there was work in progress to get all of NetBSD building uner
gcc-2.95.2 - I'm not sure what state that is in now.  The kernel for all
architectures probably doesn't build properly using gcc-2.95.

To facilitate bleeding-edge software on top of a stable core OS, NetBSD
has a GREAT package system. gcc-2.95.2 is in there and I have used it
quite successfully on my i386.  However, it looks like the package isn't
for the powerpc port yet.  This could be because some powerpc
functionality is missing from GCC/binutils or just that no-one has yet
done the work to get GCC/powerpc working under NetBSD.

If you really wanted to, you could try to get gcc-2.95 built for
NetBSD/powerpc.  My experience with building gcc from scratch has allways
been positive (built several cross compilers without many problems) but
thats allways been on i386.  Any idea what version of GCC linux/ppc comes

So probably the right question to ask (on or maybe is "What is required to get the gcc package working
on powerpc".  Someone may have done the work already and it just hasn't
been submitted to pkgsrc.

Hope this helps.