Subject: MKPICLIB and binutils not happy together
To: None <>
From: Simon Burge <>
List: tech-toolchain
Date: 03/12/2002 00:45:02

On mips (and vax by inspection) targets, the programs in
gnu/usr.bin/binutils get relinked every time you run "make".  This
is because the libbfd_pic.a gets referenced in many of the Makefile
fragments but on architectures where MKPICLIB=no gets set in
<> there isn't an lib<foo>_pic.a library built, just the
lib<foo>.a library.

Now, the knowledge of whether or not an _pic library is needed (the
MKPICLIB variable) is local to <>.  There's two ways I can
see around this:

  1. Move the decisions in the top of <> to <>
     (or somewhere else).

  2. Add some target ("PRINTPICLIB"??) to <> so you can
     do something like:

	DPADD+!= cd ${TOP}/lib/libbfd && ${PRINTPICLIB}

     (does +!= work?!) where PRINTPICLIB would be something like


     (this is untested).

The later concept seems more correct - any other ideas?

This is similar to the dbsym case in PR misc/15856, except there the
dependancy in the Makefile fragment lists libbfd.a and so works on
mips/vax but not on everything else.

Simon Burge                            <>
NetBSD CDs, Support and Service: