已开启
Fixed build error when enabling NEON optimization #44
panzhe0328创建于 2025年11月25日
Fixed build error when enabling NEON optimization #44
已开启
panzhe0328创建于 2025年11月25日
refs/pull/44/head合入到master
2 个文件变更+29-13
@@ -1,18 +1,19 @@
1-From 70001f178343e82b3b4ae0872a1accd4a06d474d Mon Sep 17 00:00:00 20011+From 55a0e6b6a348204d69fcaa861d16d3ace7925473 Mon Sep 17 00:00:00 2001
2-From: zhangxingrong <zhangxingrong@uniontech.com>2+From: panzhe <panzhe@kylinos.cn>
3-Date: Tue, 21 May 2024 17:33:27 +08003+Date: Thu, 4 Dec 2025 10:37:44 +0800
4Subject: [PATCH] libpng fix arm neon4Subject: [PATCH] libpng fix arm neon
5 5 
6---6---
7- configure.ac | 4 ++++7+ configure.ac | 4 ++++
8- pngpriv.h | 2 +-8+ contrib/libtests/pngvalid.c | 2 +-
9- 2 files changed, 5 insertions(+), 1 deletion(-)9+ pngpriv.h | 2 +-
10+ 3 files changed, 6 insertions(+), 2 deletions(-)
10 11 
11diff --git a/configure.ac b/configure.ac12diff --git a/configure.ac b/configure.ac
12-index 505d72f..4466b1c 10064413+index a9c7661..029a878 100644
13--- a/configure.ac14--- a/configure.ac
14+++ b/configure.ac15+++ b/configure.ac
15-@@ -393,17 +393,21 @@ AC_ARG_ENABLE([arm-neon],16+@@ -401,17 +401,21 @@ AC_ARG_ENABLE([arm-neon],
16 [case "$enableval" in17 [case "$enableval" in
17 no|off)18 no|off)
18 # disable the default enabling on __ARM_NEON__ systems:19 # disable the default enabling on __ARM_NEON__ systems:
@@ -34,11 +35,24 @@ index 505d72f..4466b1c 100644
34 AC_DEFINE([PNG_ARM_NEON_OPT], [2],35 AC_DEFINE([PNG_ARM_NEON_OPT], [2],
35 [Enable ARM Neon optimizations])36 [Enable ARM Neon optimizations])
36 AC_MSG_WARN([--enable-arm-neon: please specify 'check' or 'api';]37 AC_MSG_WARN([--enable-arm-neon: please specify 'check' or 'api';]
38+diff --git a/contrib/libtests/pngvalid.c b/contrib/libtests/pngvalid.c
39+index 64de171..2dac8da 100644
40+--- a/contrib/libtests/pngvalid.c
41++++ b/contrib/libtests/pngvalid.c
42+@@ -11936,7 +11936,7 @@ int main(int argc, char **argv)
43+ const char *arg = 9+*argv;
44+ unsigned char option=0, setting=0;
45+
46+-#ifdef PNG_ARM_NEON
47++#if defined(PNG_ARM_NEON) && defined(PNG_ARM_NEON_API_SUPPORTED)
48+ if (strncmp(arg, "arm-neon:", 9) == 0)
49+ option = PNG_ARM_NEON, arg += 9;
50+
37diff --git a/pngpriv.h b/pngpriv.h51diff --git a/pngpriv.h b/pngpriv.h
38-index 9bfdb71..60aae9b 10064452+index 3105d58..f4b81c3 100644
39--- a/pngpriv.h53--- a/pngpriv.h
40+++ b/pngpriv.h54+++ b/pngpriv.h
41-@@ -127,7 +127,7 @@55+@@ -135,7 +135,7 @@
42 * associated assembler code, pass --enable-arm-neon=no to configure56 * associated assembler code, pass --enable-arm-neon=no to configure
43 * or put -DPNG_ARM_NEON_OPT=0 in CPPFLAGS.57 * or put -DPNG_ARM_NEON_OPT=0 in CPPFLAGS.
44 */58 */
@@ -48,5 +62,4 @@ index 9bfdb71..60aae9b 100644
48 # define PNG_ARM_NEON_OPT 262 # define PNG_ARM_NEON_OPT 2
49 # else63 # else
50-- 64--
51-2.43.065+2.33.0
52- 
@@ -1,7 +1,7 @@
1Name: libpng1Name: libpng
2Epoch: 22Epoch: 2
3Version: 1.6.533Version: 1.6.53
4-Release: 14+Release: 2
5Summary: A library of functions for manipulating PNG image format files5Summary: A library of functions for manipulating PNG image format files
6License: zlib6License: zlib
7URL: https://www.libpng.org/pub/png/libpng.html7URL: https://www.libpng.org/pub/png/libpng.html
@@ -83,6 +83,9 @@ autoreconf -vif
83%{_mandir}/man*/*83%{_mandir}/man*/*
84 84 
85%changelog85%changelog
86+* Thu Dec 18 2025 panzhe <panzhe@kylinos.cn> - 2:1.6.53-2
87+- Fixed build error when enabling NEON optimization
88+ 
86* Sun Dec 07 2025 Funda Wang <fundawang@yeah.net> - 2:1.6.53-189* Sun Dec 07 2025 Funda Wang <fundawang@yeah.net> - 2:1.6.53-1
87- update to 1.6.5390- update to 1.6.53
88 91