Subject: gdb Makefile botch: SVR4_SHARED_LIBS belongs in ${ARCH}/tm-nbsd.h
To: None <tech-toolchain@netbsd.org>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: tech-toolchain
Date: 03/06/1999 02:14:46
The NetBSD-specific Makefile attempts to define -DSVR4_SHARED_LIBS in
the Maekfile for ports that need it.

That's a bug.

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.

Some ports -- mips and powerpc/{mips,powerpc} do this already.  Adding
-DSVR4_SHARED_LIBS to CFLAGS in the Makefile triggers a `duplicate
definition' error, which is also a bug ;).

Maybe a `cleaner' fix is to create dist/gnu/gdb/config/t-nbsdelf.h
with all the elf-specific definntions, turn on SVR4_SHARED_LIBS there,
and do
    #include "config/tm-nbsdelf.h"

in each ELF arch's arch-specific tm-nbsd.h.