We need to add -DLARGE_CONFIG to the gcc compile (it's a flag to boehm-gc, included in libgcj). I imagine that, at least on occasion, many people are in the position of patching gcc (!). It would be great if adding src_compile() { append-flags -DLARGE_CONFIG toolchain_src_compile } did the trick, but it doesn't, because gcc_do_filter_flags filters out that -D with a call to strip_flags. The upshot is that in order to send this flag to gcc, I have to patch the eclass, rather than just create a revbump'd gcc ebuild. Any solutions I can think of will be obvious to the toolchain maintainers, and I don't have the background to know which is best, so I'll leave that issue alone.
strip-flags now allows -D*