Well, since linux applications generally are not self-contained it can be a nightmare upgrading if you use plain RPM:s. One solution, and don't let that scare you, is to build GCC 3.4.3 from source. Doing so won't require the very latest version of the packages (binutils etc etc, see complete list at their site) even if the gcc-3.4.3-rpm does. Here are the steps I (and I stress I here, these steps might not be appropiate for your system) use when building GCC from source:
Code:
$ cd /path_to/gcc-3.4.3.tar.bz2
$ mkdir obj_gcc_3.4.3
$ bunzip2 gcc-3.4.3.tar.bz2
$ tar xvf gcc-3.4.3.tar
$ cd obj_gcc_3.4.3/
$ ../gcc-3.4.3/configure --enable-languages=c,c++ --prefix=/usr/local/gcc-3.4.3
$ make
$ make install
This will install gcc 3.4.3 to /usr/local/gcc-3.4.3 and that path won't conflict with anything else you have installed.
But in order to use it properly you must update your PATH. On my system I edit a file called /etc/profile and there I add
"/usr/local/gcc-3.4.3/bin:" (without the quotes) first to the PATH-statement. It needs to be first so it will find this version
of GCC before it finds any previously installed version. When you have finished editing the file perform this command so the changes goes "live":
Code:
$ source /path/to/filewithpath
When building C++ programs you need link to the C++ standard library. To do that,
add the following in your linking command:
Code:
-L/usr/local/gcc-3.4.3/lib/
This works on my system and it may work on yours. You might want to check out the other options available when configuring to see if anything's missing. One thing that may confuse some people is that you have separate source and build directories when building GCC. It's normal for GCC even though it may look odd to some.