Pull up following revision(s) (requested by riz in ticket #825):
share/mk/bsd.lib.mk: revision 1.358 via patch
fix MKDEBUG vs parallel builds. split the creation of the final
.so file from the main link of it, and use the main file as the
input for both the .so output and the .so.debug file. for MKDEBUG
builds we now:
(a) create the (new) .so.full file
(d) create the .so.debug file
(c) create the (installable) .so file
for other builds, we simply use the same rule for (a) to create (c).
this stops the .so.debug rule from modifying the .so rule's target
and leading to mayhem.
see this thread for more details:
http://mail-index.netbsd.org/tech-toolchain/2015/06/03/msg002616.html