package/zlib-ng: Backport patch to fix linking on powerpc

Commit 192dfc68c0 ("package/zlib-ng: fix build on powerpc") turned the
Power8 optimisations off to fix a build issue. Instead apply a patch
from the develop branch upstream to fix the issue.

This patch is not yet in a released version of zlib-ng.

Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
Joel Stanley 2022-04-04 18:42:56 +09:30 committed by Arnout Vandecappelle (Essensium/Mind)
parent ee978e853a
commit 04e26cb7fe
2 changed files with 27 additions and 6 deletions

View File

@ -0,0 +1,27 @@
From 677f56825f7080403e18e57ffe8177f3df290f20 Mon Sep 17 00:00:00 2001
From: Nathan Moinvaziri <nathan@nathanm.com>
Date: Sun, 23 Jan 2022 12:59:01 -0800
Subject: [PATCH] Use static keyword for vec_sumsu to prevent undefined
reference error when g++ linking.
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
arch/power/adler32_power8.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/power/adler32_power8.c b/arch/power/adler32_power8.c
index 029aa3a84c57..fc4086322efc 100644
--- a/arch/power/adler32_power8.c
+++ b/arch/power/adler32_power8.c
@@ -44,7 +44,7 @@
#include "adler32_p.h"
/* Vector across sum unsigned int (saturate). */
-inline vector unsigned int vec_sumsu(vector unsigned int __a, vector unsigned int __b) {
+static inline vector unsigned int vec_sumsu(vector unsigned int __a, vector unsigned int __b) {
__b = vec_sld(__a, __a, 8);
__b = vec_add(__b, __a);
__a = vec_sld(__b, __b, 4);
--
2.35.1

View File

@ -23,10 +23,4 @@ ifeq ($(BR2_arm),y)
ZLIB_NG_CONF_OPTS += -DWITH_ACLE=1 -DWITH_NEON=1
endif
ifeq ($(BR2_powerpc_power8),y)
ZLIB_NG_CONF_OPTS += -DWITH_POWER8=ON
else
ZLIB_NG_CONF_OPTS += -DWITH_POWER8=OFF
endif
$(eval $(cmake-package))