stdenv.targetPlatform really shouldn't be used by software that
doesn't generate or manipulate binaries. I reviewed all uses of
targetPlatform outside of pkgs/development/compilers and pkgs/stdenv
and replaced those which weren't involved in something which fits
these criteria.
The install targets were "install_hdrs"
and "install_shared_lib". The later is obviously not
correct for a static build and was changed to
"install_lib" (corresponds to libcctz.a) for that case.