From 19e4d8dcc9c9e76a8c90855cccb4c4553b35389e Mon Sep 17 00:00:00 2001 From: Anders Betts Date: Sun, 20 Sep 2026 23:09:31 +0200 Subject: deploy: cross-compile static aarch64 for the Alpine image --- deploy/cross-build.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 deploy/cross-build.sh (limited to 'deploy/cross-build.sh') diff --git a/deploy/cross-build.sh b/deploy/cross-build.sh new file mode 100644 index 0000000..19d07b7 --- /dev/null +++ b/deploy/cross-build.sh @@ -0,0 +1,16 @@ +#!/bin/sh +# Cross-compile the static aarch64 backend binaries (bokfd, bokfctl). +# Expects the source read-only at /src, writes the binaries to /out and takes +# the version from $VERSION. Run through deploy/Dockerfile.cross. OpenSSL and +# glibc are linked statically, so the Alpine runtime image needs no shared +# libraries (the kernel ABI is all that matters). +set -eu + +make -C /src -j"$(nproc)" BUILD=/tmp/build backend \ + CC=aarch64-linux-gnu-gcc \ + CFLAGS="-O2 -g -static -L/usr/lib/aarch64-linux-gnu" \ + SSL_LIBS="-l:libssl.a -l:libcrypto.a -ldl -lpthread" \ + VERSION="${VERSION:-0.1.0-dev}" + +mkdir -p /out +cp /tmp/build/bokfd /tmp/build/bokfctl /out/ -- cgit v1.3