diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7b4de2ca7..b32ba358f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,6 +27,7 @@ jobs: - { os: ubuntu-22.04, target: linux, platform: linux-x64, container: 'alpine:latest', libc: musl } - { os: ubuntu-20.04, target: linux, platform: linux-x64 } - { os: ubuntu-20.04, target: linux, platform: linux-arm64 } + - { os: ubuntu-20.04, target: linux, platform: linux-riscv64 } - { os: macos-latest, target: darwin, platform: darwin-x64 } - { os: macos-latest, target: darwin, platform: darwin-arm64 } - { os: windows-latest, target: windows, platform: win32-ia32 } @@ -41,6 +42,12 @@ jobs: sudo apt-get update sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu + - name: Install riscv64-linux-gnu + if: ${{ matrix.platform == 'linux-riscv64' && matrix.libc != 'musl' }} + run: | + sudo apt-get update + sudo apt-get install -y gcc-riscv64-linux-gnu g++-riscv64-linux-gnu + - name: Prepare container for musl if: ${{ matrix.target == 'linux' && matrix.libc == 'musl' }} run: | diff --git a/changelog.md b/changelog.md index da0137de2..1a591cfb5 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,7 @@ ## Unreleased +* NEW Support for Linux RISCV64 builds. ## 3.12.0 `2024-10-30` diff --git a/make/detect_platform.lua b/make/detect_platform.lua index 4b62298ff..f8eadd52d 100644 --- a/make/detect_platform.lua +++ b/make/detect_platform.lua @@ -25,6 +25,8 @@ elseif platform.os == 'linux' then elseif lm.platform == "linux-x64" then elseif lm.platform == "linux-arm64" then lm.cc = 'aarch64-linux-gnu-gcc' + elseif lm.platform == "linux-riscv64" then + lm.cc = 'riscv64-linux-gnu-gcc' else error "unknown platform" end @@ -49,6 +51,7 @@ local ARCH = { x86_64 = 'x64', i686 = 'ia32', arm64 = 'arm64', + riscv64 = 'riscv64' } local function detectArch()