Optimize linker by minimizing calls to tryGCC to avoid fork/exec overhead.