mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-12 06:57:57 +04:00
zlib: do not build POWER8 code on 32-bit PowerPC
zlib-ng decides whether to build its POWER8 and POWER9 sources from a
probe that compiles getauxval(AT_HWCAP2) & PPC_FEATURE2_ARCH_2_07 and
nothing else, so it accepts any target whose libc has getauxval. On
mpc85xx that offers POWER8 to an e500v2 and the build fails:
adler32_power8.c:126:13: error: '__builtin_vsx_lxvw4x_v16qi' requires
the '-mvsx' option
POWER8 is ISA 2.07 and POWER9 is ISA 3.0, 64-bit server ISAs that no
32-bit PowerPC in the tree implements, so turn both off for
ARCH=powerpc. powerpc64 keeps them, where they build and zlib-ng gates
them on HWCAP2 at runtime.
Fixes: b6ab56871d ("zlib: switch to zlib-ng 2.3.3 in zlib-compatible mode")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
1 parent
3760244fae
commit
bb6df54d9d
1 file changed
+10
-1
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=zlib
|
||||
PKG_VERSION:=2.3.3
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/zlib-ng/zlib-ng.git
|
||||
@@ -66,6 +66,15 @@ CMAKE_OPTIONS += \
|
||||
-DZLIB_COMPAT=ON \
|
||||
-DBUILD_TESTING=OFF
|
||||
|
||||
# POWER8 and POWER9 are 64-bit server ISAs; zlib-ng enables them from a probe
|
||||
# that only looks for getauxval and PPC_FEATURE2_ARCH_2_07, so it offers them
|
||||
# on e500 and PPC464 as well, where the compiler has no VSX to emit.
|
||||
ifeq ($(ARCH),powerpc)
|
||||
CMAKE_OPTIONS += \
|
||||
-DWITH_POWER8=OFF \
|
||||
-DWITH_POWER9=OFF
|
||||
endif
|
||||
|
||||
define Build/InstallDev
|
||||
mkdir -p $(1)/usr/include
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/{zconf,zlib,zlib_name_mangling}.h \
|
||||
|
||||
Reference in new issue
Block a user