Skip to content

Commit 29a0793

Browse files
authored
Statically link OpenOCD and Risc-V toolchain on Linux (#4)
* Build OpenOCD and Risc-V toolchain as static on Linux * Reinstate Risc-V toolchain build
1 parent 2fc323f commit 29a0793

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ permissions:
44
contents: write
55

66
env:
7-
SKIP_RISCV: 1
7+
SKIP_RISCV: 0
88

99
jobs:
1010
build_windows:

packages/linux/openocd/build-openocd.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
set -euo pipefail
44

5+
export CFLAGS=-static
6+
export LDFLAGS=-static
7+
58
cd openocd
69
sed -i -e 's/uint /unsigned int /g' ./src/flash/nor/rp2040.c
710
./bootstrap

packages/linux/riscv/build-riscv-gcc.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
set -euo pipefail
44

5+
export CFLAGS=-static
6+
export LDFLAGS=-static
7+
58
INSTALLDIR="riscv-install"
69
rm -rf $INSTALLDIR
710
mkdir -p $INSTALLDIR

0 commit comments

Comments
 (0)