Subject: Re: gdb Makefile botch: SVR4_SHARED_LIBS belongs in ${ARCH}/tm-nbsd.h
To: Jason Thorpe <>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: tech-toolchain
Date: 03/06/1999 22:00:19
> > That definition needs to go into each arch's tm-*.h file, so that it
> > gets defined correctly for, e.g., building a cross-debugger on some
> > non-NetBSD host targeted for NetBSD.

Whoops, looks like the code is using nm-nbsd.h.  I'm making it so for
alpha as well as mips and powerpc. i dont know if thats the right
place for a cross-debugger intended to debug netbsd coredumps, netbsd
binaries, and netbsd shared libs.

The hairy case is ports like SPARC, which officiially are a.out, but
where our makefiles support building an ELF userland.  (or sparc64,
mumble groan.)  If you build with our OBJECT_FMT set to ELF,
presumably you want SVR4-style libraries.

So I've changed the -DSVR4_SHARED_LIBS flag in the Makefile to be
-DNETBSD_OBJECT_FMT_ELF instead. dist/gdb/config/nm-nbsd.h now checks
for NETBSD_OBJECT_FMT_ELF, and if it's set and SVR4_SHARED_LIBS ins't
then it turns on SVR4_SHARED_LIBS.

If we feed these back to Cygnus, people building with the FSF native
config will get our default toolchain settings, but our native
Makefile can still force ELF for an a.out port. Sound OK?

> >     #include "config/tm-nbsdelf.h"
> > 
> > in each ELF arch's arch-specific tm-nbsd.h.
>Make it so :-)

Turns out there's not much to put into a {n,t}m-nbsdelf.h.  It'd make
more sense to split out the netbsd-aout to sunos-aout renaming macros
into config/nm-nbsd-aout.h.