Not the official method I'm sure but you could create a little wrapper script called cc earlier in your path that does exec gcc-4.x.y "$@" Jon > - Setting a CC environment variable seems not to have any effect.