From 10ef77f50d49f98ccc5aacb8921136431e8f59ae Mon Sep 17 00:00:00 2001
From: Richard Muzik <richard.muzik@nic.cz>
Date: Thu, 11 Jul 2024 14:31:49 +0200
Subject: [PATCH] patches/packages/openssh: fix compilation for 1x

The build was failing with the following error:

powerpc-openwrt-linux-muslspe-gcc: error: unrecognized command line option '-fzero-call-used-regs=skip'
---
 ...-openssh-fix-compilation-for-powerpc.patch | 29 +++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 patches/packages/hack/0021-openssh-fix-compilation-for-powerpc.patch

diff --git a/patches/packages/hack/0021-openssh-fix-compilation-for-powerpc.patch b/patches/packages/hack/0021-openssh-fix-compilation-for-powerpc.patch
new file mode 100644
index 000000000..8d1a49b19
--- /dev/null
+++ b/patches/packages/hack/0021-openssh-fix-compilation-for-powerpc.patch
@@ -0,0 +1,29 @@
+From 67a64fba62453100c94cafdc8513446fa42fc240 Mon Sep 17 00:00:00 2001
+From: Richard Muzik <richard.muzik@nic.cz>
+Date: Thu, 11 Jul 2024 14:16:18 +0200
+Subject: [PATCH] openssh: fix compilation for powerpc
+
+---
+ net/openssh/Makefile | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/net/openssh/Makefile b/net/openssh/Makefile
+index ac580fc71..436d79f85 100644
+--- a/net/openssh/Makefile
++++ b/net/openssh/Makefile
+@@ -180,7 +180,11 @@ CONFIGURE_ARGS += \
+ 	--with-stackprotect \
+ 	--with$(if $(CONFIG_OPENSSL_ENGINE),,out)-ssl-engine \
+ 	--with$(if $(CONFIG_OPENSSH_LIBFIDO2),,out)-security-key-builtin \
+-	--with-cflags-after=-fzero-call-used-regs=skip
++
++ifneq ($(ARCH),powerpc)
++CONFIGURE_ARGS += \
++        --with-cflags-after=-fzero-call-used-regs=skip
++endif
+ 	
+ ifeq ($(BUILD_VARIANT),with-pam)
+ CONFIGURE_ARGS += \
+-- 
+2.45.2
+
-- 
GitLab