#!/bin/sh
# The reMarkable 2 uses Cortex-A7, ARMv7 hard float and glibc 2.39.
# Zig supplies cross-linker support; the SDK supplies the device runtime.
set -eu
: "${EGILL_REMARKABLE_SYSROOT:?Set this to the extracted reMarkable 2 SDK sysroot}"
exec zig cc -target arm-linux.5.4-gnueabihf.2.39 -mcpu=cortex_a7 \
    --sysroot="$EGILL_REMARKABLE_SYSROOT" -L/usr/lib "$@"
