From b0cfcd494010e2d5550075d54149587c1eda8f80 Mon Sep 17 00:00:00 2001
From: psykose <alice@ayaya.dev>
Date: Thu, 15 Jun 2023 00:04:03 +0000
Subject: [PATCH] community/dotnet7-build: mask fstack-clash-protection outside
 of x86

---
 community/dotnet7-build/APKBUILD | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/community/dotnet7-build/APKBUILD b/community/dotnet7-build/APKBUILD
index 33268ea9c3f8..c46fe23cfc6d 100644
--- a/community/dotnet7-build/APKBUILD
+++ b/community/dotnet7-build/APKBUILD
@@ -261,6 +261,15 @@ build() {
 		export DOTNET_LTTng=0
 	fi
 
+	case "$CARCH" in
+	x86*) ;;
+	*)
+		# clang doesn't implement this outside of x86, and it causes a later configure to fail
+		export CFLAGS="${CFLAGS/-fstack-clash-protection}"
+		export CXXFLAGS="${CXXFLAGS/-fstack-clash-protection}"
+		;;
+	esac
+
 	# looks for most recent recent version of _artifactsdir
 	local _artifactsdir=$(find $_libdir/dotnet/artifacts/$_pkgver_macro* -maxdepth 0 | sort -r | head -n 1)
 
@@ -298,10 +307,7 @@ build() {
 	./build.sh \
 		--with-sdk "$_cli_root" \
 		--with-packages "$_artifactsdir" \
-		-- $args || {
-		find . -name "CMakeConfigureLog.yaml" -type f -exec sh -c 'echo logfile: $1; cat $1' - {} \;
-		return 1
-	}
+		-- $args
 }
 
 check() {
-- 
GitLab