> Please correct me if I am wrong that I
> understand the version of gcc with the patches that are available on
> sgi's kernprof website are 2.9.x.
Yes, indeed. Some subsequent versions of gcc appear to not need that
patch, but yet the -pg option doesn't produce viable binaries. As Dave
Hansen pointed out, gcc-3.0 and gcc-3.1 appear to work correctly
(without any patches for -pg). I personally had some success months ago
with gcc-3.0 (or perhaps it was 3.0.1?), but at the time I believe I
remember seeing concerns on the linux-kernel mailing list that gcc-3.0.x
had problems with some parts of kernel code. I'd say that if 3.1 works
for you, then go with that!