Skip to content

Commit 80163bf

Browse files
committed
Add support for mipsel
Again all the credit goes to @mara0004 See #93
1 parent a068e53 commit 80163bf

9 files changed

Lines changed: 34 additions & 3 deletions

File tree

.github/workflows/build-all.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,17 @@ jobs:
316316
target_cpu: arm64
317317
enable_v8: true
318318

319+
linux_mipsel:
320+
name: Linux mipsel
321+
uses: ./.github/workflows/build.yml
322+
with:
323+
branch: ${{ github.event.inputs.branch }}
324+
version: ${{ github.event.inputs.version }}
325+
is_debug: ${{ github.event.inputs.is_debug == 'true' }}
326+
target_os: linux
327+
target_cpu: mipsel
328+
enable_v8: false
329+
319330
linux_mips64el:
320331
name: Linux mips64el
321332
uses: ./.github/workflows/build.yml
@@ -760,6 +771,7 @@ jobs:
760771
- linux_musl_arm64
761772
- linux_musl_x64
762773
- linux_musl_x86
774+
- linux_mipsel
763775
- linux_mips64el
764776
- linux_ppc64
765777
- linux_x64

.github/workflows/build-one.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ on:
2727
options:
2828
- arm
2929
- arm64
30+
- mipsel
3031
- mips64el
3132
- ppc64
3233
- x64

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ on:
2828
type: string
2929
required: true
3030
target_cpu:
31-
description: Target (CPU arm|arm64|mips64el|ppc64|x64|x86|wasm)
31+
description: Target (CPU arm|arm64|mipsel|mips64el|ppc64|x64|x86|wasm)
3232
type: string
3333
required: true
3434
target_environment:

.github/workflows/patch.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ jobs:
5959
environment: musl
6060
- os: linux
6161
cpu: ppc64
62+
- os: linux
63+
cpu: mipsel
6264
- os: linux
6365
cpu: mips64el
6466
- os: emscripten

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ Here are the download links for latest release:
9797
<td><a href="https://github.com/bblanchon/pdfium-binaries/releases/latest/download/pdfium-linux-arm64.tgz">pdfium-linux-arm64.tgz</a></td>
9898
<td><a href="https://github.com/bblanchon/pdfium-binaries/releases/latest/download/pdfium-v8-linux-arm64.tgz">pdfium-v8-linux-arm64.tgz</a></td>
9999
</tr>
100+
<tr>
101+
<td>mipsel</td>
102+
<td><a href="https://github.com/bblanchon/pdfium-binaries/releases/latest/download/pdfium-linux-mipsel.tgz">pdfium-linux-mipsel.tgz</a></td>
103+
<td>not tested yet</td>
104+
</tr>
100105
<tr>
101106
<td>mips64el</td>
102107
<td><a href="https://github.com/bblanchon/pdfium-binaries/releases/latest/download/pdfium-linux-mips64el.tgz">pdfium-linux-mips64el.tgz</a></td>

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash -eu
22

33
OS_NAMES="android|emscripten|ios|linux|mac|win"
4-
CPU_NAMES="arm|arm64|mips64el|ppc64|x64|x86|wasm"
4+
CPU_NAMES="arm|arm64|mipsel|mips64el|ppc64|x64|x86|wasm"
55
ENV_NAMES="catalyst|device|musl|simulator"
66
OS_ENV_COMBINATIONS="linux musl|ios (catalyst|device|simulator)"
77
STEP_REGEX="[0-9]|10"

steps/01-install.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,14 @@ case "$TARGET_OS" in
8181
sudo apt-get install -y libc6-i386 gcc-10-multilib g++-10-aarch64-linux-gnu gcc-10-aarch64-linux-gnu
8282
;;
8383

84+
mipsel)
85+
sudo apt-get install -y gcc-11-multilib g++-11-mipsel-linux-gnu gcc-11-mipsel-linux-gnu
86+
sudo update-alternatives --install /usr/bin/mipsel-linux-gnu-gcc mipsel-linux-gnu-gcc /usr/bin/mipsel-linux-gnu-gcc-11 100
87+
sudo update-alternatives --install /usr/bin/mipsel-linux-gnu-g++ mipsel-linux-gnu-g++ /usr/bin/mipsel-linux-gnu-g++-11 100
88+
sudo update-alternatives --set mipsel-linux-gnu-gcc /usr/bin/mipsel-linux-gnu-gcc-11
89+
sudo update-alternatives --set mipsel-linux-gnu-g++ /usr/bin/mipsel-linux-gnu-g++-11
90+
;;
91+
8492
mips64el)
8593
sudo apt-get install -y gcc-11-multilib g++-11-mips64el-linux-gnuabi64 gcc-11-mips64el-linux-gnuabi64
8694
sudo update-alternatives --install /usr/bin/mips64el-linux-gnuabi64-gcc mips64el-linux-gnuabi64-gcc /usr/bin/mips64el-linux-gnuabi64-gcc-11 100

steps/03-patch.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ case "$TARGET_ENVIRONMENT" in
8080
esac
8181

8282
case "$TARGET_CPU" in
83-
mips64el)
83+
mipsel|mips64el)
8484
apply_patch "$PATCHES/mips64el/build.patch" build
8585
;;
8686
ppc64)

steps/09-test.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ case "$OS" in
8686
SUFFIX="-10"
8787
fi
8888
;;
89+
mipsel)
90+
PREFIX="mipsel-linux-gnu-"
91+
;;
8992
mips64el)
9093
PREFIX="mips64el-linux-gnuabi64-"
9194
;;

0 commit comments

Comments
 (0)