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 --- ...h-sourcefiles-in-patch-002-to-buildsystem.patch | 100 +++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 package/libs/zlib/patches/003-attach-sourcefiles-in-patch-002-to-buildsystem.patch (limited to 'package/libs/zlib/patches/003-attach-sourcefiles-in-patch-002-to-buildsystem.patch') diff --git a/package/libs/zlib/patches/003-attach-sourcefiles-in-patch-002-to-buildsystem.patch b/package/libs/zlib/patches/003-attach-sourcefiles-in-patch-002-to-buildsystem.patch new file mode 100644 index 0000000000..68f317b24b --- /dev/null +++ b/package/libs/zlib/patches/003-attach-sourcefiles-in-patch-002-to-buildsystem.patch @@ -0,0 +1,100 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8e75f66..24d7329 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -95,34 +95,67 @@ set(ZLIB_PUBLIC_HDRS + ${CMAKE_CURRENT_BINARY_DIR}/zconf.h + zlib.h + ) +-set(ZLIB_PRIVATE_HDRS +- crc32.h +- deflate.h +- gzguts.h +- inffast.h +- inffixed.h +- inflate.h +- inftrees.h +- trees.h +- zutil.h +-) +-set(ZLIB_SRCS +- adler32.c +- compress.c +- crc32.c +- deflate.c +- gzclose.c +- gzlib.c +- gzread.c +- gzwrite.c +- inflate.c +- infback.c +- inftrees.c +- inffast.c +- trees.c +- uncompr.c +- zutil.c +-) ++ ++if(ARMv8) ++ set(ZLIB_PRIVATE_HDRS ++ crc32.h ++ deflate.h ++ gzguts.h ++ inffast.h ++ inffixed.h ++ inflate.h ++ inftrees.h ++ trees.h ++ zutil.h ++ contrib/arm/chunkcopy.h ++ ) ++ set(ZLIB_SRCS ++ adler32.c ++ compress.c ++ crc32.c ++ deflate.c ++ gzclose.c ++ gzlib.c ++ gzread.c ++ gzwrite.c ++ infback.c ++ inftrees.c ++ contrib/arm/inflate.c ++ contrib/arm/inffast.c ++ trees.c ++ uncompr.c ++ zutil.c ++ ) ++ else() ++ set(ZLIB_PRIVATE_HDRS ++ crc32.h ++ deflate.h ++ gzguts.h ++ inffast.h ++ inffixed.h ++ inflate.h ++ inftrees.h ++ trees.h ++ zutil.h ++ ) ++ set(ZLIB_SRCS ++ adler32.c ++ compress.c ++ crc32.c ++ deflate.c ++ gzclose.c ++ gzlib.c ++ gzread.c ++ gzwrite.c ++ inflate.c ++ infback.c ++ inftrees.c ++ inffast.c ++ trees.c ++ uncompr.c ++ zutil.c ++ ) ++endif() + + if(NOT MINGW) + set(ZLIB_DLL_SRCS -- cgit v1.2.3