From 35a90f27693226108547a118809f2e7648264f48 Mon Sep 17 00:00:00 2001 From: henderkes Date: Sun, 21 Sep 2025 20:32:47 +0200 Subject: [PATCH] skip -mcpu or -march=armv8-... flags because zig doesn't support them (stupid grpc build thirdparty hardcode) --- src/SPC/store/scripts/zig-cc.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/SPC/store/scripts/zig-cc.sh b/src/SPC/store/scripts/zig-cc.sh index d4090a0f..6b340bc1 100644 --- a/src/SPC/store/scripts/zig-cc.sh +++ b/src/SPC/store/scripts/zig-cc.sh @@ -19,9 +19,15 @@ while [[ $# -gt 0 ]]; do ARG_ABS="$(realpath "$ARG" 2>/dev/null || true)" [[ "$ARG_ABS" == "$BUILDROOT_ABS" ]] && PARSED_ARGS+=("-I$ARG") || PARSED_ARGS+=("-isystem$ARG") ;; - -march=*|-mcpu=*) # replace -march=x86-64 with -march=x86_64 + -march=*|-mcpu=*) OPT_NAME="${1%%=*}" OPT_VALUE="${1#*=}" + # Skip armv8- flags entirely as Zig doesn't support them + if [[ "$OPT_VALUE" == armv8-* ]]; then + shift + continue + fi + # replace -march=x86-64 with -march=x86_64 OPT_VALUE="${OPT_VALUE//-/_}" PARSED_ARGS+=("${OPT_NAME}=${OPT_VALUE}") shift