Works with GCC 12, older versions have bugs in the configure script which prevent building libstdc++ directly. It might be possible to work around that by building GCC and then cross-compiling libstdc++ separately...?
export TARGET=mipsel-elf
export PREFIX=/opt/rbdev-gcc12-cxx