Your making this task a lot harder then it needs to be......
All supported version of Red Hat Linux can support binaries built with gcc-2.96, some will require the compat-liggcc packages. The same is true for gcc-3.3.3 built binaries. For Red Hat Enterprise Linux, 2.X is gcc-2.96 based, 3.x is gcc-3.2.3 based and 4.X is gcc-3.4.5 based. A simple reading of the release notes can tell you this;
http://www.redhat.com/docs/manuals/enterprise/
Notice I said all supported versions, Red Hat ended support for all versions of RHL (the freely downloadabe versions) nearly 2 years ago. Which gcc is supported for these still can be found by reading the release notes forn them;
http://www.redhat.com/docs/manuals/linux/
A simple query of /proc/version will provide an intelligent way to know which gcc version was used to build the kernel. A simple query of gcc will also do the same;
Human readabe quires;
cat /proc/version
gcc --version
I cannot say for SuSE, but I believe all of this could be done pretty much the same way.
Hopefully I pointed you in the right direction, the rest is a matter of research.