The default for gcc on AIX is to compile with full TOC (-mfull-toc). But this can lead to "TOC overflow" errors at linktime. AIX does have the linker flag '-bbigtoc' to avoid this problem. But gdb does not work correctly with binaries using big TOC. So switching gcc's default to '-mminimal-toc' seems necessary, see also http://www-03.ibm.com/servers/enable/site/peducation/wp/df2e/df2e.pdf With gcc-3.4.6, this must not be done for gcc itself. Instead, the installed 'specs' needs to be patched. With gcc-4.*, patching gcc-source to change the default works.
For gcc-3.4.6 done in r43716.
Fpr gcc-4.2.4 done in r58998. For gcc-4.4.5 done in r58998.
(In reply to comment #0) > With gcc-4.*, patching gcc-source to change the default works. Well, not really: Building libstdc++ (and eventually libgcc_s) with minimal-toc breaks C++ exception handling.
(In reply to comment #3) > (In reply to comment #0) > > With gcc-4.*, patching gcc-source to change the default works. > > Well, not really: Building libstdc++ (and eventually libgcc_s) with minimal-toc > breaks C++ exception handling. gcc-4.2.4-r* (without revbump) now defaults to '-mno-fp-in-toc -mno-sum-in-toc' instead of '-mminimal-toc' to keep C++ exceptions working. Let's see which package now still exceeds normal TOC and needs either -mminimal-toc compiler flag or -bbigtoc linker flag (net-misc/mico?).
assuming latest fixes and compiler bumps fixed this issue.