diff --git a/build_linux.sh b/build_linux.sh index fa6eb50..30fdbe7 100755 --- a/build_linux.sh +++ b/build_linux.sh @@ -6,9 +6,6 @@ set -euo pipefail SKIP_RISCV=${SKIP_RISCV-0} SKIP_OPENOCD=${SKIP_OPENOCD-0} -export CFLAGS=-static -export LDFLAGS=-static - # Install prerequisites sudo apt install -y jq cmake libtool automake libusb-1.0-0-dev libhidapi-dev libftdi1-dev # RISC-V prerequisites diff --git a/packages/linux/openocd/build-openocd.sh b/packages/linux/openocd/build-openocd.sh index 30e4ae7..7303c8b 100755 --- a/packages/linux/openocd/build-openocd.sh +++ b/packages/linux/openocd/build-openocd.sh @@ -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 diff --git a/packages/linux/riscv/build-riscv-gcc.sh b/packages/linux/riscv/build-riscv-gcc.sh index ec0ffd7..4e06520 100755 --- a/packages/linux/riscv/build-riscv-gcc.sh +++ b/packages/linux/riscv/build-riscv-gcc.sh @@ -2,6 +2,9 @@ set -euo pipefail +export CFLAGS=-static +export LDFLAGS=-static + INSTALLDIR="riscv-install" rm -rf $INSTALLDIR mkdir -p $INSTALLDIR