For Bourne-style shells (BASH, ZSH, etc.) ``export CC=gcc`` will do it for the current shell (won't save it for future use, that requires setting it in your shell's config file. For CSH style I think it is ``setenv CC gcc`` but I am not sure.