I've updated the link above with guides for both 32bit and 64bit MAME cross compiles. Both verified and working on my setup, and confirmed by at least one other person. For me it takes an ~8 hour compile on my RPi4 overclocked to 2.0GHz down to a ~1 hour compile on my Core i5 machine.

I've added some links to scripts as well to hopefully make it a bit easier for people to get going. Still not automated end-to-end, but enough for someone familiar with package installation under Debian/Ubuntu to build a working cross compile environment.

I'm fairly confident this could be modified for anything running on RPi that uses gcc or g++ to compile, as long as the compile time headers and link time libraries were known, or could be discovered.

For example, if you want to find the dependencies for, say, ScummVM, install the "apt-rdepends" package on your RPi, and run:

apt-rdepends scummvm | grep -v ^' ' | sort | uniq | tr '\n' ' '

They're your runtime dependencies. To find build dependencies, ensure there's a matching "deb-src" repo for every "deb" repo in your /etc/apt/sources.list and your /etc/apt/sources.list/*list files, then run:

sudo apt-get build-dep scummvm

And log the files installed. You can find all dev packages installed with something like:

dpkg -l | grep '\-dev' | awk '{print $2}' | awk -F ':' '{print $1}

That would probably get you 99% of the way there. Ditto for anything where an older version is in the native Debian/Raspbian repos, and you want to build a much newer version.