Version 12.1 of the GNU Compiler Collection (GCC) was released this month, and among its many changes is support for China’s LoongArch processor architecture.
The announcement of the release is here; the LoongArch port was accepted as recently as March.
China’s Academy of Sciences developed a family of MIPS-compatible microprocessors in the early 2000s. In 2010 the tech was spun out into a company callled Loongson Technology which today markets silicon under the brand “Godson”. The company bills itself as working to develop technology that secures China and underpins its ability to innovate, a reflection of Beijing’s believe that home-grown CPU architectures are critical to the nation’s future.
LoongArch emerged from Loongson around about last year, and was described as a new RISC ISA that comes in 32-bit and 64-bit flavours.
GCC 12.1 seemingly supports the 64-bit side (LA64), according to the release notes:
The ISA’s designers have said LoongArch is similar to MIPS and RISC-V; at least one Linux kernel developer has complained it’s basically MIPS all over again. MIPS isn’t so trendy these days – RISC-V is the new open-source silicon hotness. Even MIPS the company is doing RISC-V chips. Although China made some bold claims about RISC-V, it can’t quite seem to let go of MIPS for its Loongson line.
LoongArch is said to be the CPU architecture of Loongson’s latest silicon, such as the 3A5000 processor. Previous chips, such as the 3A4000, are definitely 64-bit MIPS affairs. Loongson engineers tried to submit code to the Linux kernel in March this year to support an LS3A4000-powered motherboard made by Chinese computer-maker Lemote.
One Chinese blogger published an informative review of this MIPS64 Lemote system. It was made to run UnionTech UOS, which is the China-only commercial version of Debian-based Deepin.
Another MIPS64 Lemote model, the Fulong mini-PC, comes with a version of Fedora called Dragon Dream F28, and web engine developers Igalia report that it’s tricky to run anything else on the box.
This is why getting support into the upstream Linux kernel is important, and there is at least some Loongson support in the mainline kernel codebase (not so much for LoongArch so far). For anything that doesn’t make or hasn’t made it into the open-source project, Loongson and its customers must maintain their own branch of the kernel, such as Loongnix. If the source code on GitHub is any indication, this effort can lag considerably behind the current kernel.
Loongson is not the only Chinese processor line. The newer RISC-V architecture XiangShan processors look promising. There is, or was, also an x86-compatible joint venture with Taiwanese Via Technologies, the KaiXian range from Zhaoxin. Huawei has developed an Arm-based range of “Kunpeng” processors, and China’s top clouds have developed silicon for servers and AO. However, it looks like Loongson is not going away just yet. ®