Skip to content

Commit

Permalink
Statically link OpenOCD and Risc-V toolchain on Linux (#4)
Browse files Browse the repository at this point in the history
* Build OpenOCD and Risc-V toolchain as static on Linux

* Reinstate Risc-V toolchain build
  • Loading branch information
will-v-pi authored Sep 23, 2024
1 parent 2fc323f commit 29a0793
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ permissions:
contents: write

env:
SKIP_RISCV: 1
SKIP_RISCV: 0

jobs:
build_windows:
Expand Down
3 changes: 3 additions & 0 deletions packages/linux/openocd/build-openocd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

set -euo pipefail

export CFLAGS=-static
export LDFLAGS=-static

cd openocd
sed -i -e 's/uint /unsigned int /g' ./src/flash/nor/rp2040.c
./bootstrap
Expand Down
3 changes: 3 additions & 0 deletions packages/linux/riscv/build-riscv-gcc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

set -euo pipefail

export CFLAGS=-static
export LDFLAGS=-static

INSTALLDIR="riscv-install"
rm -rf $INSTALLDIR
mkdir -p $INSTALLDIR
Expand Down

0 comments on commit 29a0793

Please sign in to comment.