This was a problem on OSX, where gcc maps to clang and didn't understand the command line argument, and then no gcc was found.