Various toolchain fixes/improvements