Subject: Re: getting gcc-2.95.2 working
To: Brad Chapman <chapmanb@arches.uga.edu>
From: Andrew Cagney <ac131313@cygnus.com>
List: port-macppc
Date: 07/09/2001 00:07:41
> [...]
> checking for sys_errlist... no
> checking for sys_nerr... no
> checking for sys_siglist... no
> [...]
> 
> and looking at the code, the offending problems are inside a 
> #ifndef HAVE_SYS_ERRLIST.
> 
> But I'm not sure about a fix; I guess we need to add -D__ELF__ to the 
> list of definitions, but I have zero clue how to do that.
> 
> Any thoughts or suggestions from anyone? 


That is what I've done to my GCC>3.0 tree.  Some reverse engineering 
(gcc -v is your friend) revealed that:

gcc/config/rs6000/sysv.h:
#define CPP_OS_NETBSD_SPEC "\
-D__powerpc__ -D__NetBSD__ -D__ELF__ -D__KPRINTF_ATTRIBUTE__"

need to be added.

What you do next is an interesting question.  You could look at 
/usr/src/gnu/dist/gcc/config/rs6000/netbsd.h (mumble somthing about 
contamination :-).   (I've also got >3.0 working (clean room) for at 
least C so I'll post a patch real-soon-now ...).

	Andrew