[PATCH] Conditionally include nlist.h in solib-legacy.c

Kevin Buettner kevinb@cygnus.com
Fri Mar 23 08:40:00 GMT 2001

On Mar 23, 11:13am, Andrew Cagney wrote:

> Looking back at this.  I don't know that solib-legacy should ever be
> appearing in the list of TDEPFILES.  Given it can only work in native
> builds, I think it should only be included in the NATDEPFILES.

You're right.

I put it in the TDEPFILES list for two reasons:

  1) Laziness.  (It was easier to just search for solib-svr4.o and add
     it to each line containing this file.)

  2) To avoid link errors.

My concern regarding #2 was as follows:  If you put solib-legacy.o in
host A's NATDEPFILES and then you configure an A cross B debugger where
B doesn't have solib-svr4.o in its TDEPFILES, you'll end up with a link
error when you're done.

I've just recently learned, however, that this won't happen since
NATDEPFILES is commented out when building cross debuggers.

Since problem #2 is disposed of, all I need to do is overcome #1.
(I'll try to get around to looking at it over the weekend.)

> I suspect this was the real reason for the compile problems.

Probably so.  However, I also think that the solib-legacy code is
better off using the autoconf supplied feature tests.

More information about the Gdb-patches mailing list