Raspberry pi is more or less a normal linux, so it should work.
On android you can use Termux + clang. I have a working pystan installed. Only thing is that I need to create models without obfuscation due to maximum path problem (android 5). On android 6 there is a fix for it.
Officially one can not get gcc+gfortran but there is an unofficial release that works (mostly) so in theory one could install R.
Edit. CmdStan works. Build failed probably due to memory error (-j4 / -j3). Without -jx build did run normally.
CmdStan build is crashing. I don’t know why.