From looking at /var/tmp/portage/linux-headers-2.6.1/temp/environment there's a line in there that's

Code:

ARCH=i386_64

I'm guessing this should be x86_64? I'm not really familiar with the emerge process other than as an end-user. Does anyone have any idea where the script is going wrong? From looking at crossdev it looks like it just calls ebuild to do most of the work.

No, I tried building a cross compiler with crossdev, crossgcc, looking at those scripts, tons of stuff. I had absolutely NO success even getting the bootstrap gcc to build. So I gave up. It was taking more time to mess with all of that stuff than it would have saved me.

From what I found, the make procedures for gcc and glibc are horribly broken in recent releases, all the way from gcc 3.2 - current, and all versions of glibc from 2.3 on. Motivation to fix them seems minimal, so I think we're out of luck. I don't have the time to learn how the gcc build process is supposed to work, much less try and fix the problem.

? ...and then using -m32 to compile your 32-bit code? I've used this successfully in the past, I don't know if it would be sufficient for your purposes.

If not, you might try out crosstool, if you haven't already. I haven't used it for amd64/i386 cross-compilers, but it does work for building amd64/mipsel cross-compilers; maybe it'll work better than your previous attempts.