The configure script for libX11 tries to get a clean environment with the (GNU?) '-undef' option to cpp - which doesn't exist on IRIX.
This causes the build to error-out. Simply reversing the sense of this test allows the build to complete successfully, though - and I can't see any ill affects of having a few additional values defined.
(It looks as if 'cpp' is only used for building the man-pages in any case, and there's a comment in the configure script stating that their method of testing cpp is probably a hack ;)
... still a problem in libX11-1.1.4, same fix still works.
x11-libs/libXt-1.0.5 affected too
Created attachment 180680 [details, diff]
Patch to allow libX11 to build on compilers lacking '-undef' and/or '-traditional'
Preserve warning, but remove erroneous abort from libX11.
I can't find neither of these symbols in the configure files of recent libX11, so I assume upstream has fixed this problem.
Whether through IRIX-MIPSpro-wrapper or through (hopefully) upstream changes, the latest libX11 and libXt build cleanly! :D