toolchain: revised to fix certain issues

W.I.P