Deal with even more oddities in build systems

- -x c with *.cpp file names
- ensure we don't mess up GCC's object files when goto-ld refuses linking