Skip to contentSkip to conversation

package/zlib-ng: fix Power 8 build failure due to missing VSX(set soft-float)

PATCH New Giulio Benetti 1 participant 1 message Feb 12

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/zlib-ng: fix Power 8 build failure due to missing VSX(set soft-float)

Add local patch pending upstream to fix build failure on Power8 with soft-float enabled.

Fixes:
https://autobuild.buildroot.org/results/a0fa5a175c546993d818371a0de93b2e9845a183/

---
 ...ix-build-failure-on-Power8-with-soft.patch | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 package/zlib-ng/0001-CMakeLists.txt-fix-build-failure-on-Power8-with-soft.patch
package/zlib-ng/0001-CMakeLists.txt-fix-build-failure-on-Power8-with-soft.patch new file +37 -0
new file mode 100644
index 0000000000..e3dd9c8612
@@ -0,0 +1,37 @@
+From 065481dbdff2a85389f4e9fec9b4ab0e37f4f568 Mon Sep 17 00:00:00 2001
+From: Giulio Benetti <[email protected]>
+Date: Thu, 12 Feb 2026 22:08:17 +0100
+Subject: [PATCH] CMakeLists.txt: fix build failure on Power8 with soft-float
+
+Even if all Power8 has VSX extension, we can decide to build a toolchain
+forcing soft-float. This way VSX is not recognized by CMake but at the
+moment building on Power8 assumes VSX is available and in this particular
+case it's not true. So let's guard the building of Power8 accelerators
+against HAVE_NOVSX.
+
+Upstream: https://github.com/zlib-ng/zlib-ng/pull/2151
+Signed-off-by: Giulio Benetti <[email protected]>
+---
+ CMakeLists.txt | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 25376429..be337789 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -905,8 +905,10 @@ if(WITH_OPTIM)
+         # Power8 specific options and files
+         if(WITH_POWER8)
+             if(HAVE_POWER8_INTRIN)
+-                add_definitions(-DPOWER8_VSX)
+-                set(POWER8_SRCS ${ARCHDIR}/adler32_power8.c ${ARCHDIR}/chunkset_power8.c ${ARCHDIR}/slide_hash_power8.c)
++                if(NOT HAVE_NOVSX)
++                    add_definitions(-DPOWER8_VSX)
++                    set(POWER8_SRCS ${ARCHDIR}/adler32_power8.c ${ARCHDIR}/chunkset_power8.c ${ARCHDIR}/slide_hash_power8.c)
++                endif()
+                 if("${ARCH}" MATCHES "powerpc64(le)?")
+                     add_definitions(-DPOWER8_VSX_CRC32)
+                     list(APPEND POWER8_SRCS ${ARCHDIR}/crc32_power8.c)
+-- 
+2.47.3
+
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot