In a previous post I explained how to build Google Gears under Debian/Ubuntu, and the process involved some hacks to use a version of GCC different from the most updated one.
Then my friend Davide sent me some suggestions explaining that I could have used the "update-alternatives" command to manage symbolic links to the desired version of a tool.
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.2 10
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.3 20
update-alternatives --config g++