Skip to content

Commit 4fa52aa

Browse files
committed
Try enabling linux-riscv64 builds
Signed-off-by: falkTX <[email protected]>
1 parent 8d0269e commit 4fa52aa

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

.github/workflows/example-plugins.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,48 @@ jobs:
127127
path: |
128128
bin/*
129129
130+
linux-riscv64:
131+
runs-on: ubuntu-20.04
132+
steps:
133+
- uses: actions/checkout@v2
134+
with:
135+
submodules: recursive
136+
- name: Fix GitHub's mess
137+
run: |
138+
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
139+
sudo apt-get update -qq
140+
sudo apt-get install -yqq --allow-downgrades libgd3/focal libpcre2-8-0/focal libpcre2-16-0/focal libpcre2-32-0/focal libpcre2-posix2/focal
141+
# sudo apt-get install -yqq --allow-downgrades libegl1/focal libegl-mesa0/focal libglapi-mesa/focal libgl1/focal libgl1-mesa-dri/focal libglvnd0/focal libglx0/focal libglx-mesa0/focal
142+
sudo apt-get purge -yqq libclang* libgbm* libllvm* libmono* moby* mono* php* libgdiplus libpcre2-posix3 libzip4
143+
- name: Set up dependencies
144+
run: |
145+
sudo dpkg --add-architecture riscv64
146+
sudo sed -i "s/deb http/deb [arch=amd64] http/" /etc/apt/sources.list
147+
echo "deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports focal main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/ports-riscv64.list
148+
echo "deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-riscv64.list
149+
echo "deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-riscv64.list
150+
sudo apt-get update -qq
151+
dpkg -l | grep libgl
152+
sudo apt-get install -y g++-riscv64-linux-gnu libasound2-dev:riscv64 libcairo2-dev:riscv64 libdbus-1-dev:riscv64 libgl1-mesa-dev:riscv64 libglapi-mesa:riscv64 libglvnd0:riscv64 liblo-dev:riscv64 libpulse-dev:riscv64 libx11-dev:riscv64 libxcursor-dev:riscv64 libxext-dev:riscv64 libxrandr-dev:riscv64 qemu-user-static
153+
# libgl-dev:riscv64 libgles-dev:riscv64 libglvnd-dev:riscv64 libglx-dev:riscv64 libgl1:riscv64 libegl-dev:riscv64 libegl-dev:riscv64 libglx0:riscv64 libegl1:riscv64 libglx-mesa0:riscv64 libegl-mesa0:riscv64 libglapi-mesa:riscv64 libgl1-mesa-dri:riscv64 libgbm1:riscv64 libllvm12:riscv64
154+
- name: Build linux riscv64 cross-compiled
155+
env:
156+
CC: riscv64-linux-gnu-gcc
157+
CXX: riscv64-linux-gnu-g++
158+
LDFLAGS: -static-libgcc -static-libstdc++
159+
PKG_CONFIG_PATH: /usr/lib/riscv64-linux-gnu/pkgconfig
160+
run: |
161+
make features
162+
make WITH_LTO=true -j $(nproc)
163+
- name: Set sha8
164+
id: slug
165+
run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)"
166+
- uses: actions/upload-artifact@v2
167+
with:
168+
name: ${{ github.event.repository.name }}-linux-riscv64-${{ github.event.pull_request.number || steps.slug.outputs.sha8 }}
169+
path: |
170+
bin/*
171+
130172
linux-x86_64:
131173
runs-on: ubuntu-20.04
132174
steps:

distrho/src/DistrhoPluginCLAP.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
#include "DistrhoPluginInternal.hpp"
1818
#include "extra/ScopedPointer.hpp"
1919

20+
#if DISTRHO_PLUGIN_HAS_UI && ! defined(HAVE_DGL) && ! DISTRHO_PLUGIN_HAS_EXTERNAL_UI
21+
# undef DISTRHO_PLUGIN_HAS_UI
22+
# define DISTRHO_PLUGIN_HAS_UI 0
23+
#endif
24+
2025
#if DISTRHO_PLUGIN_HAS_UI
2126
# include "DistrhoUIInternal.hpp"
2227
# include "../extra/Mutex.hpp"

0 commit comments

Comments
 (0)