Add a quick and dirty script to check validity of links in elf files


git-svn-id: svn+ssh://svn.freebsd.org/base/head@274199 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Automatically build with debug symbols when building with WITH_CTF.
Otherwise there's nothing for ctfconvert to do, and it ends up emitting an
error for each object file. Also remove some redundant checks from
bsd.prog.mk and bsd.lib.mk.

Differential Revision:	https://reviews.freebsd.org/D1111
Reviewed by:		imp


git-svn-id: svn+ssh://svn.freebsd.org/base/head@274200 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
SUBDIR_DEPENDS__ in lib/Makefile is not working out so well for me.
Add to using _prebuild_libs in (top-level) Makefile.inc1.
NB: Unbreak build yet again (we'll get this right eventually)

Reviewed by:	markj, ngie
Thanks to:	ian, markj, ngie, Nikolai Lifanov <lifanov@mail.lifanov.com>
MFC after:	21 days
X-MFC-to:	stable/10 stable/9
X-MFC-with:	274116 274120 274121 274123 274144 274146 274192


git-svn-id: svn+ssh://svn.freebsd.org/base/head@274203 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f