Skip to contentSkip to conversation

workflow: Add loongarch64 build

PATCH Applied Simon Horman 1 participant 2 messages Sep 23, 2025 – Sep 29, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 workflow: Add loongarch64 build

Add loongarch64 to build matrix.

A gcc-14 package is installed as there is no generic gcc package for loongarch in Ubuntu 24.04. Hopefully this will be resolved in Ubuntu 26.04.

---
 .github/workflows/build.yml | 8 ++++++++
 1 file changed, 8 insertions(+)
.github/workflows/build.yml +8 -0
index d1b3e74391ffa3e20764cea69fd5d02e9e4fce6c..1dbb31bca111c0f2746567b0ce81f70e30043776 100644
@@ -13,6 +13,7 @@ jobs:
         - arm64
         - hppa
         - i686
+        - loongarch64
         - m68k
         - mips
         - mipsel
@@ -46,6 +47,8 @@ jobs:
           x86_64)      ;;
           x86_64-x32)  GNU_ARCH="x86_64-linux-gnux32"
                        CROSS_COMPILER_PKG="gcc-x86-64-linux-gnux32" ;;
+          loongarch64) CROSS_COMPILER_PKG="gcc-14-loongarch64-linux-gnu"
+                       ;& # Fallthrough
           *)           GNU_ARCH="$ARCH-linux-gnu" ;;
         esac
 
@@ -66,6 +69,11 @@ jobs:
         sudo apt-get update
         sudo apt-get -q=2 install ${{ env.EXTRA_PKGS }}
 
+    - name: Add GCC Link
+      if: matrix.arch == 'loongarch64'
+      run: |
+        ( cd /usr/bin && sudo ln -s loongarch64-linux-gnu-gcc-14 loongarch64-linux-gnu-gcc; )
+
     - name: Build
       run: |
         ./bootstrap