From 7b4380a10a394d30d88a4a77c3ea894d825cd40e Mon Sep 17 00:00:00 2001 From: Maxim Biro Date: Fri, 29 Mar 2024 13:05:30 -0400 Subject: [PATCH] fix: Static build on non-amd64 targets --- script/build-minimal-static-toxic.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/script/build-minimal-static-toxic.sh b/script/build-minimal-static-toxic.sh index 6262d99db..890558d7b 100755 --- a/script/build-minimal-static-toxic.sh +++ b/script/build-minimal-static-toxic.sh @@ -88,7 +88,11 @@ set -x MAKEFLAGS=j$(nproc) export MAKEFLAGS # TODO(nurupo): Once GCC 14 comes out, switch to using the new -fhardened -CFLAGS="-ftrivial-auto-var-init=zero -fPIE -pie -Wl,-z,relro,-z,now -fstack-protector-strong -fstack-clash-protection -fcf-protection=full" +CFLAGS="-ftrivial-auto-var-init=zero -fPIE -pie -Wl,-z,relro,-z,now -fstack-protector-strong -fstack-clash-protection" +if [ "$(uname -m)" == "x86_64" ] +then + CFLAGS="$CFLAGS -fcf-protection=full" +fi export CFLAGS check_sha256()