I actually have written bionic -> glibc compatibility layer.
https://github.com/Cloudef/android2gnulinux
If it's a native binary, there's good chance you can run it with this. JNI/Java stuff is mostly unity and even that's very proof of concept.
GNU/Linux as a term is often used for precisely these situations. It evokes the image of something like Debian or Arch on a desktop or server. Very distinct from Android.
I can use a terminal on Android and use a few familiar tools, but the same is true of macOS.
Install one of those chroot apps that give you a distro's package manager on it and then you can. I once did to compile a Qt program on arm. Just install the gcc package and compile away. It was way easier than trying to set up cross-compilation in my Linux box at the time.