The toplevel, common, and igen dirs all have their own code for setting up toolchain settings. Unify all of that in a new macro.