General fixes to improve stability of build

 * Provides a more consistent, stable environment for bootstrapping
   llvm/clang and other packages.
 * Important upstream musl fixes.