build(native): the hook is built with its Go support and tracked by the preload recipe

This commit is contained in:
Kurt Himebauch committed 2026-11-09 12:26:36 -05:00
1 parent 092661b69c
commit d05f895ccf
2 files changed
+13 -5

No files matched your search

+5 -1
View File
@@ -5,7 +5,11 @@ set -euo pipefail
here=$(cd "$(dirname "$0")" && pwd)
out=${1:?output path}
cc=${2:-aarch64-linux-gnu-gcc}
gen=$(mktemp -d)
trap 'rm -rf "$gen"' EXIT
mkdir -p "$gen/gosys"
bash "$here/build-gosys.sh" "$gen/gosys/gosys_blob.h"
"$cc" -std=gnu11 -shared -fPIC -O2 -fno-delete-null-pointer-checks -Wall -Wno-nonnull-compare \
-Wno-format-truncation -Wno-stringop-truncation -Wl,-z,max-page-size=16384 \
-Wno-format-truncation -Wno-stringop-truncation -Wl,-z,max-page-size=16384 -I "$gen" \
-o "$out" "$here/ddnatv-hook.c" -ldl
"${cc%gcc}strip" --strip-unneeded "$out"