[Buildroot] [PATCH] package/zlib-ng: Backport patch to fix linking on powerpc

Yann E. MORIN yann.morin.1998 at free.fr
Tue Apr 5 19:55:45 UTC 2022


Arnout, All,

On 2022-04-04 22:17 +0200, Arnout Vandecappelle spake thusly:
> On 04/04/2022 11:12, Joel Stanley wrote:
> >Commit 192dfc68c0e4 ("package/zlib-ng: fix build on powerpc") turned the
>  Peter just backported this one to 2022.02.x...
> >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 at jms.id.au>
>  Applied to master, thanks.

Err... Why would we enable the POWER8 optimisations when the target is
not a POWER8 ?

Backporting the patch seems correct, but the enabling/disabling the
optinisations should have stayed, I believe...

Regards,
Yann E. MORIN.

> >---
> >  ...rd-for-vec_sumsu-to-prevent-undefine.patch | 27 +++++++++++++++++++
> >  package/zlib-ng/zlib-ng.mk                    |  6 -----
> >  2 files changed, 27 insertions(+), 6 deletions(-)
> >  create mode 100644 package/zlib-ng/0001-Use-static-keyword-for-vec_sumsu-to-prevent-undefine.patch
> >
> >diff --git a/package/zlib-ng/0001-Use-static-keyword-for-vec_sumsu-to-prevent-undefine.patch b/package/zlib-ng/0001-Use-static-keyword-for-vec_sumsu-to-prevent-undefine.patch
> >new file mode 100644
> >index 000000000000..cc103215de3c
> >--- /dev/null
> >+++ b/package/zlib-ng/0001-Use-static-keyword-for-vec_sumsu-to-prevent-undefine.patch
> >@@ -0,0 +1,27 @@
> >+From 677f56825f7080403e18e57ffe8177f3df290f20 Mon Sep 17 00:00:00 2001
> >+From: Nathan Moinvaziri <nathan at 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 at 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
> >+
> >diff --git a/package/zlib-ng/zlib-ng.mk b/package/zlib-ng/zlib-ng.mk
> >index 938acd4181a6..fb497b8c11d0 100644
> >--- a/package/zlib-ng/zlib-ng.mk
> >+++ b/package/zlib-ng/zlib-ng.mk
> >@@ -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))
> _______________________________________________
> buildroot mailing list
> buildroot at buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'



More information about the buildroot mailing list