From 3acecba5209984e43397bc0eaa96822ccacb5712 Mon Sep 17 00:00:00 2001 From: Daniel Engberg Date: Tue, 5 Sep 2017 20:38:07 +0200 Subject: package/libs/zlib: Add ARM and NEON optimizations This adds two optimizations for ARM: NEON optimized Adler(-)32 checksum algorithm (ARMv7 and newer NEON CPUs) ARM(v7+) specific optimization for inflate I've also connected inflate optimization to the build using the following source as template. https://github.com/mirror/chromium/commit/0397489124ce7e6aced020f8b85f5034c7d5f49b#diff-a62ad2db6c83dbc205d34bb9a8884f16 Additional info: https://codereview.chromium.org/2676493007/ https://codereview.chromium.org/2722063002/ Sources: https://github.com/madler/zlib/pull/251 (only the first commit) https://github.com/madler/zlib/pull/256 Signed-off-by: Daniel Engberg --- package/libs/zlib/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'package/libs/zlib/Makefile') diff --git a/package/libs/zlib/Makefile b/package/libs/zlib/Makefile index 597d0b6871..3602e629cf 100644 --- a/package/libs/zlib/Makefile +++ b/package/libs/zlib/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=zlib PKG_VERSION:=1.2.11 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@SF/libpng http://www.zlib.net @@ -49,6 +49,11 @@ endef TARGET_CFLAGS += $(FPIC) +ifneq ($(findstring neon,$(CONFIG_TARGET_OPTIMIZATION)),) + CMAKE_OPTIONS += \ + -DARMv8=ON +endif + define Build/InstallDev mkdir -p $(1)/usr/include $(CP) $(PKG_INSTALL_DIR)/usr/include/z{conf,lib}.h \ -- cgit v1.2.3