OK, some of us just went through this exercise for armv7a and we've decided we're going to help you get this done.
So, the first step is to get a working toolchain via crossgcc. And the first step in that, we found, is to pick the "name" of the CPU. For x86, it was x86 :-)
For our current arm, it was armv7a-eabi.
It needs to be the architecture name known to gcc for this particular architecture and CPU. So what is that for the Loongson?
Once that is done, I'll help you with the next steps. It's not hard, now that we know how it's done.
Thanks
ron