Discover Centmin Mod today
Register Now

Please add single-threaded gzip optimization

Discussion in 'Feature Requests & Suggestions' started by WebDev, Jul 29, 2016.

  1. WebDev

    WebDev New Member

    7
    3
    3
    Jul 28, 2016
    Ratings:
    +8
    Local Time:
    3:19 AM
    1.11.2
    none
    Hello,

    The gzip optimizations currently included are for multithreaded environments only (e.g. pigz). In many cases, like basic VPS on DigitalOcean, Vultr, AWS, etc. we will only have one CPU core. pigz and other multithreaded solutions don't help in that case. Could you please add the gzip optimizations made by Cloudflare, Intel, or the zlib-ng project? They're all single-threaded as far as I know, and so they give a nice boost even with one CPU core.

    zlib-ng: GitHub - Dead2/zlib-ng: zlib for the "next generation" systems. Drop-In replacement with some serious optimizations.

    Cloudflare patch: GitHub - cloudflare/zlib: CloudFlare fork of zlib with massive performance improvements

    Intel patch: GitHub - jtkukunas/zlib

    One comparison test: Updated zlib benchmarks

    (That was a year ago. It looks like Cloudflare generally does the best, but for the specific case of compressing HTML at level 5, which is similar to what nginx does (usually level 6), Intel and zlib-ng are actually fastest. Their code has changes since then.)

    Cloudflare post: Fighting Cancer: The Unexpected Benefit Of Open Sourcing Our Code

    Intel post: High Performance DEFLATE Compression with Optimizations for Genomic Data Sets | Intel® Software
     
    • Like Like x 1
  2. eva2000

    eva2000 Administrator Staff Member

    30,940
    6,913
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,409
    Local Time:
    8:19 PM
    Nginx 1.13.x
    MariaDB 5.5
    nice almost forgot about these zlib optimisations by cloudflare and intel - didn't know about zlib-ng though :)

    definitely worth looking at for centmin mod - thanks @WebDev for the heads up (y)
     
  3. eva2000

    eva2000 Administrator Staff Member

    30,940
    6,913
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,409
    Local Time:
    8:19 PM
    Nginx 1.13.x
    MariaDB 5.5
    did a quick test of bench.pl from zlib-bench/bench.pl at master · jsnell/zlib-bench · GitHub with updated git repo commit versions but seems cloudflare's zlib fails to compile on CentOS 7 while the others compiled at least. Seems for cloudflare CRC32C support you need Intel proccessor with msse4.2 hardware support. And my Intel Core i7 3635QM processor i believe does support such but still ? Might need to pass a CFLAG for -msse4.2 ?
    Code (Text):
    cat /proc/cpuinfo  | grep flags | uniq
    flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 popcnt aes xsave avx rdrand lahf_lm
    

    Code (Text):
    cat /proc/cpuinfo  | grep -o sse4_2 | uniq
    sse4_2
    

    So any or such Centmin Mod custom zlib implementation would be cpu processor specific as to whether it's supported.

    Wrote a zlibbench.sh wrapper for the bench.pl update changes https://gist.github.com/centminmod/b9b1450463f56bcd02667ee991411872/raw/zlibbench.sh

    diff of changes zlibbench.sh made to bench.pl
    Code (Text):
    diff -u /root/tools/zlib/bench.pl /root/tools/zlib/bench.pl-orig          
    --- /root/tools/zlib/bench.pl   2016-07-29 05:24:13.567704668 +0000
    +++ /root/tools/zlib/bench.pl-orig      2016-07-29 05:22:46.425286209 +0000
    @@ -42,20 +42,20 @@
    my @versions = (
         { id => 'baseline', repository => 'https://github.com/madler/zlib.git', commit_or_branch => '50893291621658f355bc5b4d450a8d06a563053d' },
         { id => 'cloudflare', repository => 'https://github.com/cloudflare/zlib.git', commit_or_branch => 'a80420c63532c25220a54ea0980667c02303460a' },
    -    { id => 'intel', repository => 'https://github.com/jtkukunas/zlib.git', commit_or_branch => '4b9e3f0c56ce0a354bcb11f048f870f2d0fc544e'},
    -    { id => 'zlib-ng', repository => 'https://github.com/Dead2/zlib-ng.git', commit_or_branch => '343c4c549107d31f6eeabfb4b31bec4502a2ea0e', CONFIGURE_FLAGS => '--zlib-compat'},
    +    { id => 'intel', repository => 'https://github.com/jtkukunas/zlib.git', commit_or_branch => 'e176b3c23ace88d5ded5b8f8371bbab6d7b02ba8'},
    +    { id => 'zlib-ng', repository => 'git@github.com:Dead2/zlib-ng.git', commit_or_branch => '4b1728a261e32e08bc5403f391ba65bfe5f4ba57', CONFIGURE_FLAGS => '--zlib-compat'},
    );
    
    # Compression levels to benchmark
    -my @compress_levels = qw(1 3 5 6);
    +my @compress_levels = qw(1 3 5 9);
    
    # Number of iterations of each benchmark to run (in addition to a single
    # warmup run).
    my $runs = 5;
    
    # Number of compressions / decompressions to do in each run
    -my $compress_iters = 5;
    -my $decompress_iters = 10;
    +my $compress_iters = 10;
    +my $decompress_iters = 50;
    
    # If true, recompile all the zlib versions before running benchmark
    my $recompile = 0;
    

    but cloudflare zlib fails to compile
    Code (Text):
    Checking for PCLMUL support ... No
    Checking for SSE4.2 support ... No
    

    Code (Text):
    Checking out cloudflare
    Cloning into 'zlib.cloudflare'...
    remote: Counting objects: 4282, done.
    remote: Total 4282 (delta 0), reused 0 (delta 0), pack-reused 4282
    Receiving objects: 100% (4282/4282), 2.33 MiB | 956.00 KiB/s, done.
    Resolving deltas: 100% (2970/2970), done.
    HEAD is now at a80420c Fix DEBUG build
    Compiling cloudflare
    Use of uninitialized value in concatenation (.) or string at /root/tools/zlib/bench.pl line 94.
    Checking for shared library support...
    Building shared library libz.so.1.2.8 with ccache gcc.
    Checking for off64_t... Yes.
    Checking for fseeko... Yes.
    Checking for strerror... Yes.
    Checking for unistd.h... Yes.
    Checking for stdarg.h... Yes.
    Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf().
    Checking for vsnprintf() in stdio.h... Yes.
    Checking for return value of vsnprintf()... Yes.
    Checking for attribute(visibility) support... Yes.
    Checking for PCLMUL support ... No
    Checking for SSE4.2 support ... No
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -c -o example.o test/example.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o adler32.o adler32.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o crc32.o crc32.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o deflate.o deflate.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o infback.o infback.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o inffast.o inffast.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o inflate.o inflate.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o inftrees.o inftrees.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o trees.o trees.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o zutil.o zutil.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o compress.o compress.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o uncompr.o uncompr.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o gzclose.o gzclose.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o gzlib.o gzlib.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o gzread.o gzread.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o gzwrite.o gzwrite.c
    ar rc libz.a adler32.o crc32.o deflate.o infback.o inffast.o inflate.o inftrees.o trees.o zutil.o compress.o uncompr.o gzclose.o gzlib.o gzread.o gzwrite.o
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o example example.o -L. libz.a
    libz.a(deflate.o): In function `fill_window':
    deflate.c:(.text+0xce): undefined reference to `_mm_crc32_u32'
    libz.a(deflate.o): In function `deflate_fast':
    deflate.c:(.text+0x4e9): undefined reference to `_mm_crc32_u32'
    deflate.c:(.text+0x67f): undefined reference to `_mm_crc32_u32'
    deflate.c:(.text+0x96a): undefined reference to `_mm_crc32_u32'
    libz.a(deflate.o): In function `deflate_stored':
    deflate.c:(.text+0xf2f): undefined reference to `_mm_crc32_u32'
    libz.a(deflate.o):deflate.c:(.text+0x1425): more undefined references to `_mm_crc32_u32' follow
    collect2: error: ld returned 1 exit status
    make: *** [example] Error 1
    

    baseline compiled zlib
    Code (Text):
    time perl /root/tools/zlib/bench.pl --output-format=json --output-file=results.json;
    Variable "@versions" will not stay shared at /root/tools/zlib/bench.pl line 305.
    Checking out baseline
    Cloning into 'zlib.baseline'...
    remote: Counting objects: 4378, done.
    remote: Total 4378 (delta 0), reused 0 (delta 0), pack-reused 4378
    Receiving objects: 100% (4378/4378), 2.37 MiB | 1.27 MiB/s, done.
    Resolving deltas: 100% (3045/3045), done.
    HEAD is now at 5089329 zlib 1.2.8
    Compiling baseline
    Use of uninitialized value in concatenation (.) or string at /root/tools/zlib/bench.pl line 94.
    Checking for shared library support...
    Building shared library libz.so.1.2.8 with ccache gcc.
    Checking for off64_t... Yes.
    Checking for fseeko... Yes.
    Checking for strerror... Yes.
    Checking for unistd.h... Yes.
    Checking for stdarg.h... Yes.
    Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf().
    Checking for vsnprintf() in stdio.h... Yes.
    Checking for return value of vsnprintf()... Yes.
    Checking for attribute(visibility) support... Yes.
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -c -o example.o test/example.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o adler32.o adler32.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o crc32.o crc32.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o deflate.o deflate.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o infback.o infback.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o inffast.o inffast.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o inflate.o inflate.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o inftrees.o inftrees.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o trees.o trees.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o zutil.o zutil.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o compress.o compress.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o uncompr.o uncompr.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o gzclose.o gzclose.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o gzlib.o gzlib.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o gzread.o gzread.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o gzwrite.o gzwrite.c
    ar rc libz.a adler32.o crc32.o deflate.o infback.o inffast.o inflate.o inftrees.o trees.o zutil.o compress.o uncompr.o gzclose.o gzlib.o gzread.o gzwrite.o
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o example example.o -L. libz.a
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -c -o minigzip.o test/minigzip.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o minigzip minigzip.o -L. libz.a
    ccache gcc -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/adler32.o adler32.c
    ccache gcc -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/crc32.o crc32.c
    ccache gcc -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/deflate.o deflate.c
    ccache gcc -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/infback.o infback.c
    ccache gcc -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/inffast.o inffast.c
    ccache gcc -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/inflate.o inflate.c
    ccache gcc -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/inftrees.o inftrees.c
    ccache gcc -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/trees.o trees.c
    ccache gcc -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/zutil.o zutil.c
    ccache gcc -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/compress.o compress.c
    ccache gcc -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/uncompr.o uncompr.c
    ccache gcc -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/gzclose.o gzclose.c
    ccache gcc -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/gzlib.o gzlib.c
    ccache gcc -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/gzread.o gzread.c
    ccache gcc -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/gzwrite.o gzwrite.c
    ccache gcc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o libz.so.1.2.8 adler32.lo crc32.lo deflate.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo zutil.lo compress.lo uncompr.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo  -lc
    rm -f libz.so libz.so.1
    ln -s libz.so.1.2.8 libz.so
    ln -s libz.so.1.2.8 libz.so.1
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o examplesh example.o -L. libz.so.1.2.8
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o minigzipsh minigzip.o -L. libz.so.1.2.8
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -D_FILE_OFFSET_BITS=64 -c -o example64.o test/example.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o example64 example64.o -L. libz.a
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -D_FILE_OFFSET_BITS=64 -c -o minigzip64.o test/minigzip.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o minigzip64 minigzip64.o -L. libz.a
    


    intel zlib compiled
    Code (Text):
    Checking out intel
    Cloning into 'zlib.intel'...
    remote: Counting objects: 4281, done.
    remote: Total 4281 (delta 0), reused 0 (delta 0), pack-reused 4281
    Receiving objects: 100% (4281/4281), 3.14 MiB | 983.00 KiB/s, done.
    Resolving deltas: 100% (2682/2682), done.
    HEAD is now at 4b9e3f0 temporarily remove deflate_quick from default config
    Compiling intel
    Use of uninitialized value in concatenation (.) or string at /root/tools/zlib/bench.pl line 94.
    Checking for shared library support...
    Building shared library libz.so.1.2.8 with ccache gcc.
    Checking for off64_t... Yes.
    Checking for fseeko... Yes.
    Checking for strerror... Yes.
    Checking for unistd.h... Yes.
    Checking for stdarg.h... Yes.
    Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf().
    Checking for vsnprintf() in stdio.h... Yes.
    Checking for return value of vsnprintf()... Yes.
    Checking for attribute(visibility) support... Yes.
    Checking for SSE2 intrinsics ... Yes.
    Checking for PCLMULQDQ intrinsics ... Yes.
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM -I. -c -o example.o test/example.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM   -c -o adler32.o adler32.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM -mpclmul -msse4 -I. -c -o crc_folding.o crc_folding.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM   -c -o crc32.o crc32.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM -msse2 -I. -c -o fill_window_sse.o fill_window_sse.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM   -c -o deflate.o deflate.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM   -c -o infback.o infback.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM   -c -o inffast.o inffast.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM   -c -o inflate.o inflate.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM   -c -o inftrees.o inftrees.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM   -c -o trees.o trees.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM   -c -o zutil.o zutil.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM   -c -o compress.o compress.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM   -c -o uncompr.o uncompr.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM   -c -o gzclose.o gzclose.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM   -c -o gzlib.o gzlib.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM   -c -o gzread.o gzread.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM   -c -o gzwrite.o gzwrite.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM   -c -o x86.o x86.c
    ar rc libz.a adler32.o crc_folding.o  crc32.o fill_window_sse.o deflate.o infback.o inffast.o inflate.o inftrees.o trees.o zutil.o compress.o uncompr.o gzclose.o gzlib.o gzread.o gzwrite.o x86.o
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM -o example example.o -L. libz.a
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM -I. -c -o minigzip.o test/minigzip.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM -o minigzip minigzip.o -L. libz.a
    ccache gcc -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM -DPIC -c -o objs/adler32.o adler32.c
    ccache gcc -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM -mpclmul -msse4 -DPIC -c -o objs/crc_folding.o crc_folding.c
    ccache gcc -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM -DPIC -c -o objs/crc32.o crc32.c
    ccache gcc -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM -msse2 -DPIC -c -o objs/fill_window_sse.o fill_window_sse.c
    ccache gcc -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM -DPIC -c -o objs/deflate.o deflate.c
    ccache gcc -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM -DPIC -c -o objs/infback.o infback.c
    ccache gcc -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM -DPIC -c -o objs/inffast.o inffast.c
    ccache gcc -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM -DPIC -c -o objs/inflate.o inflate.c
    ccache gcc -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM -DPIC -c -o objs/inftrees.o inftrees.c
    ccache gcc -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM -DPIC -c -o objs/trees.o trees.c
    ccache gcc -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM -DPIC -c -o objs/zutil.o zutil.c
    ccache gcc -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM -DPIC -c -o objs/compress.o compress.c
    ccache gcc -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM -DPIC -c -o objs/uncompr.o uncompr.c
    ccache gcc -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM -DPIC -c -o objs/gzclose.o gzclose.c
    ccache gcc -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM -DPIC -c -o objs/gzlib.o gzlib.c
    ccache gcc -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM -DPIC -c -o objs/gzread.o gzread.c
    ccache gcc -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM -DPIC -c -o objs/gzwrite.o gzwrite.c
    ccache gcc -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM -DPIC -c -o objs/x86.o x86.c
    ccache gcc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map -O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM -o libz.so.1.2.8 adler32.lo crc_folding.lo  crc32.lo fill_window_sse.lo deflate.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo zutil.lo compress.lo uncompr.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo x86.lo  -lc
    rm -f libz.so libz.so.1
    ln -s libz.so.1.2.8 libz.so
    ln -s libz.so.1.2.8 libz.so.1
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM -o examplesh example.o -L. libz.so.1.2.8
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM -o minigzipsh minigzip.o -L. libz.so.1.2.8
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM -I. -D_FILE_OFFSET_BITS=64 -c -o example64.o test/example.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM -o example64 example64.o -L. libz.a
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM -I. -D_FILE_OFFSET_BITS=64 -c -o minigzip64.o test/minigzip.c
    ccache gcc -O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM -o minigzip64 minigzip64.o -L. libz.a
    

    zlib-ng compiled
    Code (Text):
    Checking out zlib-ng
    Cloning into 'zlib.zlib-ng'...
    remote: Counting objects: 5629, done.
    remote: Total 5629 (delta 0), reused 0 (delta 0), pack-reused 5629
    Receiving objects: 100% (5629/5629), 3.51 MiB | 1.71 MiB/s, done.
    Resolving deltas: 100% (3705/3705), done.
    HEAD is now at 343c4c5 Merge pull request #74 from Majlen/develop
    Compiling zlib-ng
    Checking for shared library support...
    Building shared library libz.so.1.2.8.zlib-ng with ccache gcc.
    Checking for off64_t... Yes.
    Checking for fseeko... Yes.
    Checking for strerror... Yes.
    Checking for unistd.h... Yes.
    Checking for stdarg.h... Yes.
    Checking for ANSI C compliant compiler...  Yes.
    Checking for attribute(visibility(hidden)) support... Yes.
    Checking for attribute(visibility(internal)) support... Yes.
    Checking for __builtin_ctzl ... Yes.
    Checking for SSE2 intrinsics ... Yes.
    Checking for PCLMULQDQ intrinsics ... Yes.
    ARCH: x86_64
    Using arch directory: arch/x86
    ccache gcc -O3  -Wall -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -I/root/tools/zlib/zlib.zlib-ng -c -o example.o /root/tools/zlib/zlib.zlib-ng/test/example.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -c -o adler32.o /root/tools/zlib/zlib.zlib-ng/adler32.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -c -o compress.o /root/tools/zlib/zlib.zlib-ng/compress.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -c -o crc32.o /root/tools/zlib/zlib.zlib-ng/crc32.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -c -o deflate.o /root/tools/zlib/zlib.zlib-ng/deflate.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -c -o deflate_fast.o /root/tools/zlib/zlib.zlib-ng/deflate_fast.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -c -o deflate_medium.o /root/tools/zlib/zlib.zlib-ng/deflate_medium.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -c -o deflate_slow.o /root/tools/zlib/zlib.zlib-ng/deflate_slow.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -c -o match.o /root/tools/zlib/zlib.zlib-ng/match.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -c -o infback.o /root/tools/zlib/zlib.zlib-ng/infback.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -c -o inffast.o /root/tools/zlib/zlib.zlib-ng/inffast.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -c -o inflate.o /root/tools/zlib/zlib.zlib-ng/inflate.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -c -o inftrees.o /root/tools/zlib/zlib.zlib-ng/inftrees.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -c -o trees.o /root/tools/zlib/zlib.zlib-ng/trees.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -c -o uncompr.o /root/tools/zlib/zlib.zlib-ng/uncompr.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -c -o zutil.o /root/tools/zlib/zlib.zlib-ng/zutil.c
    make -C arch/x86 x86.o
    make[1]: Entering directory `/root/tools/zlib/zlib.zlib-ng/arch/x86'
    ccache gcc -O3  -Wall -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -I/root/tools/zlib/zlib.zlib-ng/arch/x86 -I/root/tools/zlib/zlib.zlib-ng -c -o x86.o /root/tools/zlib/zlib.zlib-ng/arch/x86/x86.c
    make[1]: Leaving directory `/root/tools/zlib/zlib.zlib-ng/arch/x86'
    cp arch/x86/x86.o x86.o
    make -C arch/x86 fill_window_sse.o
    make[1]: Entering directory `/root/tools/zlib/zlib.zlib-ng/arch/x86'
    ccache gcc -O3  -Wall -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -msse2 -I/root/tools/zlib/zlib.zlib-ng/arch/x86 -I/root/tools/zlib/zlib.zlib-ng -c -o fill_window_sse.o /root/tools/zlib/zlib.zlib-ng/arch/x86/fill_window_sse.c
    make[1]: Leaving directory `/root/tools/zlib/zlib.zlib-ng/arch/x86'
    cp arch/x86/fill_window_sse.o fill_window_sse.o
    make -C arch/x86 insert_string_sse.o
    make[1]: Entering directory `/root/tools/zlib/zlib.zlib-ng/arch/x86'
    ccache gcc -O3  -Wall -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -msse4 -I/root/tools/zlib/zlib.zlib-ng/arch/x86 -I/root/tools/zlib/zlib.zlib-ng -c -o insert_string_sse.o /root/tools/zlib/zlib.zlib-ng/arch/x86/insert_string_sse.c
    make[1]: Leaving directory `/root/tools/zlib/zlib.zlib-ng/arch/x86'
    cp arch/x86/insert_string_sse.o insert_string_sse.o
    make -C arch/x86 crc_folding.o
    make[1]: Entering directory `/root/tools/zlib/zlib.zlib-ng/arch/x86'
    ccache gcc -O3  -Wall -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -mpclmul -msse4 -I/root/tools/zlib/zlib.zlib-ng/arch/x86 -I/root/tools/zlib/zlib.zlib-ng -c -o crc_folding.o /root/tools/zlib/zlib.zlib-ng/arch/x86/crc_folding.c
    make[1]: Leaving directory `/root/tools/zlib/zlib.zlib-ng/arch/x86'
    cp arch/x86/crc_folding.o crc_folding.o
    make -C arch/x86 deflate_quick.o
    make[1]: Entering directory `/root/tools/zlib/zlib.zlib-ng/arch/x86'
    ccache gcc -O3  -Wall -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -msse4 -I/root/tools/zlib/zlib.zlib-ng/arch/x86 -I/root/tools/zlib/zlib.zlib-ng -c -o deflate_quick.o /root/tools/zlib/zlib.zlib-ng/arch/x86/deflate_quick.c
    make[1]: Leaving directory `/root/tools/zlib/zlib.zlib-ng/arch/x86'
    cp arch/x86/deflate_quick.o deflate_quick.o
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -c -o gzclose.o /root/tools/zlib/zlib.zlib-ng/gzclose.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -c -o gzlib.o /root/tools/zlib/zlib.zlib-ng/gzlib.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -c -o gzread.o /root/tools/zlib/zlib.zlib-ng/gzread.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -c -o gzwrite.o /root/tools/zlib/zlib.zlib-ng/gzwrite.c
    ar rc libz.a adler32.o compress.o crc32.o deflate.o deflate_fast.o deflate_medium.o deflate_slow.o match.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o x86.o fill_window_sse.o insert_string_sse.o crc_folding.o deflate_quick.o gzclose.o gzlib.o gzread.o gzwrite.o
    ccache gcc -O3  -Wall -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -o example example.o -L. libz.a
    ccache gcc -O3  -Wall -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -I/root/tools/zlib/zlib.zlib-ng -c -o minigzip.o /root/tools/zlib/zlib.zlib-ng/test/minigzip.c
    ccache gcc -O3  -Wall -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -o minigzip minigzip.o -L. libz.a
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -fPIC -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -DPIC -c -o adler32.lo /root/tools/zlib/zlib.zlib-ng/adler32.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -fPIC -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -DPIC -c -o compress.lo /root/tools/zlib/zlib.zlib-ng/compress.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -fPIC -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -DPIC -c -o crc32.lo /root/tools/zlib/zlib.zlib-ng/crc32.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -fPIC -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -DPIC -c -o deflate.lo /root/tools/zlib/zlib.zlib-ng/deflate.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -fPIC -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -DPIC -c -o deflate_fast.lo /root/tools/zlib/zlib.zlib-ng/deflate_fast.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -fPIC -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -DPIC -c -o deflate_medium.lo /root/tools/zlib/zlib.zlib-ng/deflate_medium.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -fPIC -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -DPIC -c -o deflate_slow.lo /root/tools/zlib/zlib.zlib-ng/deflate_slow.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -fPIC -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -DPIC -c -o match.lo /root/tools/zlib/zlib.zlib-ng/match.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -fPIC -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -DPIC -c -o infback.lo /root/tools/zlib/zlib.zlib-ng/infback.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -fPIC -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -DPIC -c -o inffast.lo /root/tools/zlib/zlib.zlib-ng/inffast.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -fPIC -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -DPIC -c -o inflate.lo /root/tools/zlib/zlib.zlib-ng/inflate.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -fPIC -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -DPIC -c -o inftrees.lo /root/tools/zlib/zlib.zlib-ng/inftrees.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -fPIC -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -DPIC -c -o trees.lo /root/tools/zlib/zlib.zlib-ng/trees.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -fPIC -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -DPIC -c -o uncompr.lo /root/tools/zlib/zlib.zlib-ng/uncompr.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -fPIC -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -DPIC -c -o zutil.lo /root/tools/zlib/zlib.zlib-ng/zutil.c
    make -C arch/x86 x86.lo
    make[1]: Entering directory `/root/tools/zlib/zlib.zlib-ng/arch/x86'
    ccache gcc -O3  -Wall -fPIC -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -I/root/tools/zlib/zlib.zlib-ng/arch/x86 -I/root/tools/zlib/zlib.zlib-ng -c -o x86.lo /root/tools/zlib/zlib.zlib-ng/arch/x86/x86.c
    make[1]: Leaving directory `/root/tools/zlib/zlib.zlib-ng/arch/x86'
    cp arch/x86/x86.lo x86.lo
    make -C arch/x86 fill_window_sse.lo
    make[1]: Entering directory `/root/tools/zlib/zlib.zlib-ng/arch/x86'
    ccache gcc -O3  -Wall -fPIC -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -msse2 -DPIC -I/root/tools/zlib/zlib.zlib-ng/arch/x86 -I/root/tools/zlib/zlib.zlib-ng -c -o fill_window_sse.lo /root/tools/zlib/zlib.zlib-ng/arch/x86/fill_window_sse.c
    make[1]: Leaving directory `/root/tools/zlib/zlib.zlib-ng/arch/x86'
    cp arch/x86/fill_window_sse.lo fill_window_sse.lo
    make -C arch/x86 insert_string_sse.lo
    make[1]: Entering directory `/root/tools/zlib/zlib.zlib-ng/arch/x86'
    ccache gcc -O3  -Wall -fPIC -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -msse4 -DPIC -I/root/tools/zlib/zlib.zlib-ng/arch/x86 -I/root/tools/zlib/zlib.zlib-ng -c -o insert_string_sse.lo /root/tools/zlib/zlib.zlib-ng/arch/x86/insert_string_sse.c
    make[1]: Leaving directory `/root/tools/zlib/zlib.zlib-ng/arch/x86'
    cp arch/x86/insert_string_sse.lo insert_string_sse.lo
    make -C arch/x86 crc_folding.lo
    make[1]: Entering directory `/root/tools/zlib/zlib.zlib-ng/arch/x86'
    ccache gcc -O3  -Wall -fPIC -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -mpclmul -msse4 -DPIC -I/root/tools/zlib/zlib.zlib-ng/arch/x86 -I/root/tools/zlib/zlib.zlib-ng -c -o crc_folding.lo /root/tools/zlib/zlib.zlib-ng/arch/x86/crc_folding.c
    make[1]: Leaving directory `/root/tools/zlib/zlib.zlib-ng/arch/x86'
    cp arch/x86/crc_folding.lo crc_folding.lo
    make -C arch/x86 deflate_quick.lo
    make[1]: Entering directory `/root/tools/zlib/zlib.zlib-ng/arch/x86'
    ccache gcc -O3  -Wall -fPIC -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -msse4 -DPIC -I/root/tools/zlib/zlib.zlib-ng/arch/x86 -I/root/tools/zlib/zlib.zlib-ng -c -o deflate_quick.lo /root/tools/zlib/zlib.zlib-ng/arch/x86/deflate_quick.c
    make[1]: Leaving directory `/root/tools/zlib/zlib.zlib-ng/arch/x86'
    cp arch/x86/deflate_quick.lo deflate_quick.lo
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -fPIC -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -DPIC -c -o gzclose.lo /root/tools/zlib/zlib.zlib-ng/gzclose.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -fPIC -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -DPIC -c -o gzlib.lo /root/tools/zlib/zlib.zlib-ng/gzlib.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -fPIC -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -DPIC -c -o gzread.lo /root/tools/zlib/zlib.zlib-ng/gzread.c
    ccache gcc -I/root/tools/zlib/zlib.zlib-ng -O3  -Wall -fPIC -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -DPIC -c -o gzwrite.lo /root/tools/zlib/zlib.zlib-ng/gzwrite.c
    ccache gcc -shared -Wl,-soname,libz.so.1,--version-script,/root/tools/zlib/zlib.zlib-ng/zlib.map -O3  -Wall -fPIC -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -o libz.so.1.2.8.zlib-ng  adler32.lo compress.lo crc32.lo deflate.lo deflate_fast.lo deflate_medium.lo deflate_slow.lo match.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo uncompr.lo zutil.lo x86.lo fill_window_sse.lo insert_string_sse.lo crc_folding.lo deflate_quick.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo  -lc
    rm -f libz.so libz.so.1
    ln -s libz.so.1.2.8.zlib-ng libz.so
    ln -s libz.so.1.2.8.zlib-ng libz.so.1
    ccache gcc -O3  -Wall -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -o examplesh example.o -L. libz.so.1.2.8.zlib-ng
    ccache gcc -O3  -Wall -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -o minigzipsh minigzip.o -L. libz.so.1.2.8.zlib-ng
    ccache gcc -O3  -Wall -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -I/root/tools/zlib/zlib.zlib-ng -D_FILE_OFFSET_BITS=64 -c -o example64.o /root/tools/zlib/zlib.zlib-ng/test/example.c
    ccache gcc -O3  -Wall -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -o example64 example64.o -L. libz.a
    ccache gcc -O3  -Wall -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -I/root/tools/zlib/zlib.zlib-ng -D_FILE_OFFSET_BITS=64 -c -o minigzip64.o /root/tools/zlib/zlib.zlib-ng/test/minigzip.c
    ccache gcc -O3  -Wall -D_LARGEFILE64_SOURCE=1 -DZLIB_COMPAT -DWITH_GZFILEOP -DHAVE_HIDDEN -DHAVE_INTERNAL -DHAVE_BUILTIN_CTZL -DMEDIUM_STRATEGY -DX86_64 -DX86_NOCHECK_SSE2 -DUNALIGNED_OK -DUNROLL_LESS -DX86_CPUID -DX86_SSE2_FILL_WINDOW -DX86_SSE4_2_CRC_HASH -DX86_PCLMULQDQ_CRC -DX86_QUICK_STRATEGY -o minigzip64 minigzip64.o -L. libz.a
    rm arch/x86/deflate_quick.lo arch/x86/x86.lo arch/x86/x86.o arch/x86/fill_window_sse.o arch/x86/insert_string_sse.lo arch/x86/crc_folding.o arch/x86/crc_folding.lo arch/x86/fill_window_sse.lo arch/x86/insert_string_sse.o arch/x86/deflate_quick.o
    
     
    Last edited: Jul 29, 2016
  4. eva2000

    eva2000 Administrator Staff Member

    30,940
    6,913
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,409
    Local Time:
    8:19 PM
    Nginx 1.13.x
    MariaDB 5.5
    Looks like intel zlib Makefile adds the appropriate flags which cloudflare's Makefile doesn't
    Code (Text):
    cat zlib.intel/Makefile | grep sse4
            $(CC) $(SFLAGS) -mpclmul -msse4 -DPIC -c -o objs/$*.o $<
            ${CC} ${CFLAGS} -mpclmul -msse4 -I. -c -o $@ crc_folding.c
            $(CC) $(SFLAGS) -msse4 -DPIC -c -o objs/$*.o $<
            ${CC} ${CFLAGS} -msse4 -I. -c -o $@ $<

    vs
    Code (Text):
    cat zlib.cloudflare/Makefile | grep sse4
    

    compare the 2 via diff
    Code (Text):
    diff -u zlib.intel/Makefile zlib.cloudflare/Makefile
    --- zlib.intel/Makefile 2016-07-29 05:28:56.276029024 +0000
    +++ zlib.cloudflare/Makefile    2016-07-29 05:28:49.873834145 +0000
    @@ -7,24 +7,22 @@
    # Normally configure builds both a static and a shared library.
    # If you want to build just a static library, use: ./configure --static
    
    -# To use the asm code, type:
    -#    cp contrib/asm?86/match.S ./match.S
    -#    make LOC=-DASMV OBJA=match.o
    
    # To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type:
    #    make install
    # To install in $HOME instead of /usr/local, use:
    #    make install prefix=$HOME
    
    +TGT_ARCH=x86_64
    CC=ccache gcc
    
    -CFLAGS=-O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM
    +CFLAGS=-O3  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN
    #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
    #CFLAGS=-g -DDEBUG
    #CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
    #           -Wstrict-prototypes -Wmissing-prototypes
    
    -SFLAGS=-O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM
    +SFLAGS=-O3  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN
    LDFLAGS=
    TEST_LDFLAGS=-L. libz.a
    LDSHARED=ccache gcc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map
    @@ -45,13 +43,6 @@
    SHELL=/bin/sh
    EXE=
    
    -FILL_WINDOW_SSE_o=fill_window_sse.o
    -FILL_WINDOW_SSE_lo=fill_window_sse.lo
    -CRC_FOLDING_o=crc_folding.o
    -CRC_FOLDING_lo=crc_folding.lo
    -DEFLATE_QUICK_o=
    -DEFLATE_QUICK_lo=
    -
    prefix =/usr/local
    exec_prefix =${prefix}
    libdir =${exec_prefix}/lib
    @@ -61,13 +52,13 @@
    man3dir = ${mandir}/man3
    pkgconfigdir = ${libdir}/pkgconfig
    
    -OBJZ = adler32.o ${CRC_FOLDING_o} ${DEFLATE_QUICK_o} crc32.o ${FILL_WINDOW_SSE_o} deflate.o infback.o inffast.o inflate.o inftrees.o trees.o zutil.o
    +OBJZ = adler32.o crc32.o deflate.o infback.o inffast.o inflate.o inftrees.o trees.o zutil.o
    OBJG = compress.o uncompr.o gzclose.o gzlib.o gzread.o gzwrite.o
    -OBJC = $(OBJZ) $(OBJG) x86.o
    +OBJC = $(OBJZ) $(OBJG)
    
    -PIC_OBJZ = adler32.lo ${CRC_FOLDING_lo} ${DEFLATE_QUICK_lo} crc32.lo ${FILL_WINDOW_SSE_lo} deflate.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo zutil.lo
    +PIC_OBJZ = adler32.lo crc32.lo deflate.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo zutil.lo
    PIC_OBJG = compress.lo uncompr.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo
    -PIC_OBJC = $(PIC_OBJZ) $(PIC_OBJG) x86.lo
    +PIC_OBJC = $(PIC_OBJZ) $(PIC_OBJG)
    
    # to use the asm code: make OBJA=match.o, PIC_OBJA=match.lo
    OBJA =
    @@ -120,30 +111,6 @@
            fi; \
            rm -f $$TMP64
    
    -fill_window_sse.lo: fill_window_sse.c
    -       -@mkdir objs 2>/dev/null || test -d objs
    -       $(CC) $(SFLAGS) -msse2 -DPIC -c -o objs/$*.o $<
    -       -@mv objs/$*.o $@
    -
    -fill_window_sse.o: fill_window_sse.c
    -       ${CC} ${CFLAGS} -msse2 -I. -c -o $@ fill_window_sse.c
    -
    -crc_folding.lo: crc_folding.c
    -       -@mkdir objs 2>/dev/null || test -d objs
    -       $(CC) $(SFLAGS) -mpclmul -msse4 -DPIC -c -o objs/$*.o $<
    -       -@mv objs/$*.o $@
    -
    -crc_folding.o: crc_folding.c
    -       ${CC} ${CFLAGS} -mpclmul -msse4 -I. -c -o $@ crc_folding.c
    -
    -deflate_quick.lo: deflate_quick.c
    -       -@mkdir objs 2>/dev/null || test -d objs
    -       $(CC) $(SFLAGS) -msse4 -DPIC -c -o objs/$*.o $<
    -       -@mv objs/$*.o $@
    -
    -deflate_quick.o: deflate_quick.c
    -       ${CC} ${CFLAGS} -msse4 -I. -c -o $@ $<
    -
    infcover.o: test/infcover.c zlib.h zconf.h
            $(CC) $(CFLAGS) -I. -c -o $@ test/infcover.c
    
    @@ -155,6 +122,18 @@
            ./infcover
            gcov inf*.c
    
    +ifneq ($(findstring -DHAS_PCLMUL, $(CFLAGS)),)
    +OBJA += crc32-pclmul_asm.o
    +crc32-pclmul_asm.o : contrib/amd64/crc32-pclmul_asm.S
    +       $(CC) $(CFLAGS) -c $< -o $@
    +endif
    +
    +ifneq ($(findstring -DHAS_PCLMUL, $(SFLAGS)),)
    +PIC_OBJA += crc32-pclmul_asm.lo
    +crc32-pclmul_asm.lo : contrib/amd64/crc32-pclmul_asm.S
    +       $(CC) $(SFLAGS) -c $< -o $@
    +endif
    +
    libz.a: $(OBJS)
            $(AR) $(ARFLAGS) $@ $(OBJS)
            -@ ($(RANLIB) $@ || true) >/dev/null 2>&1
    @@ -302,7 +281,7 @@
    gzclose.o gzlib.o gzread.o gzwrite.o: zlib.h zconf.h gzguts.h
    compress.o example.o minigzip.o uncompr.o: zlib.h zconf.h
    crc32.o: zutil.h zlib.h zconf.h crc32.h
    -deflate.o: deflate.h zutil.h zlib.h zconf.h ${DEFLATE_QUICK_o}
    +deflate.o: deflate.h zutil.h zlib.h zconf.h
    infback.o inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h inffixed.h
    inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
    inftrees.o: zutil.h zlib.h zconf.h inftrees.h
    @@ -312,7 +291,7 @@
    gzclose.lo gzlib.lo gzread.lo gzwrite.lo: zlib.h zconf.h gzguts.h
    compress.lo example.lo minigzip.lo uncompr.lo: zlib.h zconf.h
    crc32.lo: zutil.h zlib.h zconf.h crc32.h
    -deflate.lo: deflate.h zutil.h zlib.h zconf.h ${DEFLATE_QUICK_lo}
    +deflate.lo: deflate.h zutil.h zlib.h zconf.h
    infback.lo inflate.lo: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h inffixed.h
    inffast.lo: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
    inftrees.lo: zutil.h zlib.h zconf.h inftrees.h
    

    visual gist diff Revisions · zlib intel vs zlib cloudflare Makefile · GitHub

    modify the zlib cloudflare CFLAG to match Intel zlib's works for compiling clouldflare zlib
    Code (Text):
    
    [root@centos7 zlib.cloudflare]# export CFLAGS="-O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM"
    
    [root@centos7 zlib.cloudflare]# ./configure
    Checking for shared library support...
    Building shared library libz.so.1.2.8 with ccache gcc.
    Checking for off64_t... Yes.
    Checking for fseeko... Yes.
    Checking for strerror... Yes.
    Checking for unistd.h... Yes.
    Checking for stdarg.h... Yes.
    Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf().
    Checking for vsnprintf() in stdio.h... Yes.
    Checking for return value of vsnprintf()... Yes.
    Checking for attribute(visibility) support... Yes.
    Checking for PCLMUL support ... Yes
    Checking for SSE4.2 support ... Yes
    [root@centos7 zlib.cloudflare]# make
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -c -o example.o test/example.c
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o adler32.o adler32.c
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o crc32.o crc32.c
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o deflate.o deflate.c
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o infback.o infback.c
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o inffast.o inffast.c
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o inflate.o inflate.c
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o inftrees.o inftrees.c
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o trees.o trees.c
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o zutil.o zutil.c
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o compress.o compress.c
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o uncompr.o uncompr.c
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o gzclose.o gzclose.c
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o gzlib.o gzlib.c
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o gzread.o gzread.c
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN   -c -o gzwrite.o gzwrite.c
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c contrib/amd64/crc32-pclmul_asm.S -o crc32-pclmul_asm.o
    ar rc libz.a adler32.o crc32.o deflate.o infback.o inffast.o inflate.o inftrees.o trees.o zutil.o compress.o uncompr.o gzclose.o gzlib.o gzread.o gzwrite.o  crc32-pclmul_asm.o
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o example example.o -L. libz.a
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -c -o minigzip.o test/minigzip.c
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o minigzip minigzip.o -L. libz.a
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/adler32.o adler32.c
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/crc32.o crc32.c
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/deflate.o deflate.c
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/infback.o infback.c
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/inffast.o inffast.c
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/inflate.o inflate.c
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/inftrees.o inftrees.c
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/trees.o trees.c
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/zutil.o zutil.c
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/compress.o compress.c
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/uncompr.o uncompr.c
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/gzclose.o gzclose.c
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/gzlib.o gzlib.c
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/gzread.o gzread.c
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DPIC -c -o objs/gzwrite.o gzwrite.c
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -c contrib/amd64/crc32-pclmul_asm.S -o crc32-pclmul_asm.lo
    ccache gcc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -fPIC -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o libz.so.1.2.8 adler32.lo crc32.lo deflate.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo zutil.lo compress.lo uncompr.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo  crc32-pclmul_asm.lo -lc
    rm -f libz.so libz.so.1
    ln -s libz.so.1.2.8 libz.so
    ln -s libz.so.1.2.8 libz.so.1
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o examplesh example.o -L. libz.so.1.2.8
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o minigzipsh minigzip.o -L. libz.so.1.2.8
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -D_FILE_OFFSET_BITS=64 -c -o example64.o test/example.c
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o example64 example64.o -L. libz.a
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -D_FILE_OFFSET_BITS=64 -c -o minigzip64.o test/minigzip.c
    ccache gcc -DHAS_SSE42 -DHAS_PCLMUL -O3 -mpclmul -msse4 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -DX86_64 -DUNALIGNED_OK -DADLER32_UNROLL_LESS -DCRC32_UNROLL_LESS -UCHECK_SSE2 -DHAVE_SSE2 -DUSE_SSE4_2_CRC_HASH -DHAVE_PCLMULQDQ -DUSE_MEDIUM  -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -o minigzip64 minigzip64.o -L. libz.a
    
     
  5. eva2000

    eva2000 Administrator Staff Member

    30,940
    6,913
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,409
    Local Time:
    8:19 PM
    Nginx 1.13.x
    MariaDB 5.5
  6. eva2000

    eva2000 Administrator Staff Member

    30,940
    6,913
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,409
    Local Time:
    8:19 PM
    Nginx 1.13.x
    MariaDB 5.5
    update to inc/zlib.inc in 123.09beta01 but nginx compile fails with zlib-ng
    Code (Text):
    src/http/modules/ngx_http_gzip_filter_module.c:804:26: error: assigning to 'u_char *' (aka 'unsigned char *') from 'const unsigned char *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
            ctx->in_buf->pos = ctx->zstream.next_in;
                             ^ ~~~~~~~~~~~~~~~~~~~~
    1 error generated.
    make[1]: *** [objs/src/http/modules/ngx_http_gzip_filter_module.o] Error 1
    make[1]: *** Waiting for unfinished jobs....
    make[1]: Leaving directory `/svr-setup/nginx-1.11.3'
    make: *** [build] Error 2
    


    edit found Zlib-ng: a performance-oriented fork of zlib | Hacker News
     
    Last edited: Jul 29, 2016
  7. WebDev

    WebDev New Member

    7
    3
    3
    Jul 28, 2016
    Ratings:
    +8
    Local Time:
    3:19 AM
    1.11.2
    none
    Your 3635QM definitely supports SSE 4.2. Your CPU is an Ivy Bridge generation, and SSE 4.2 was introduced in Nehalem in 2008. Nehalem was before Sandy Bridge, which was before Ivy Bridge.

    At this point, any cloud VPS provider will support SSE 4.2 instructions. I just ran CPUID on one of my Vultr servers and it says AVX2 is available, which surprised me. That means that they're using Haswell or newer CPUs, so they're way past SSE 4.2. Amazon AWS also uses Haswell, and I think everyone's servers are going to at least be Sandy Bridge. Older chips than that are too expensive in that they use much more electricity and they're not able to run as many customers/VPSes on one machine.

    The mpclmul instruction is also important – it's carryless multiplication. I think they both use it.

    Do you know if the Intel and Cloudflare patches are working in your build, or is there a problem like the guy on Hacker News was saying?
     
    • Like Like x 1
  8. eva2000

    eva2000 Administrator Staff Member

    30,940
    6,913
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,409
    Local Time:
    8:19 PM
    Nginx 1.13.x
    MariaDB 5.5
    Yeah it was the flags i needed to enable for SSE 4.2 supported cpus with mpclmul instructions. But I think Nginx itself is not liking Cloudflare's zlib fork that's why Nginx failed to compile.
     
  9. eva2000

    eva2000 Administrator Staff Member

    30,940
    6,913
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,409
    Local Time:
    8:19 PM
    Nginx 1.13.x
    MariaDB 5.5
  10. WebDev

    WebDev New Member

    7
    3
    3
    Jul 28, 2016
    Ratings:
    +8
    Local Time:
    3:19 AM
    1.11.2
    none
    Hi George, what was the final word on this? Do none of the forks compile correctly with modern versions of nginx? Is this something you can fix or is it more complicated?
     
  11. eva2000

    eva2000 Administrator Staff Member

    30,940
    6,913
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,409
    Local Time:
    8:19 PM
    Nginx 1.13.x
    MariaDB 5.5
    It's probably complicated enough that it's not something I'd have free time to look into more right now given that it's not working with available codes from Cloudflare or Intel. Unless someone finds a better working code and tests it to work.
     
  12. WebDev

    WebDev New Member

    7
    3
    3
    Jul 28, 2016
    Ratings:
    +8
    Local Time:
    3:19 AM
    1.11.2
    none
    Okay, thanks for the quick reply. I might ask Cloudflare to make their fork usable. It's often hard to use their patches because they just post them without any documentation or obvious way to use them, and don't answer questions on their blog.
     
    • Agree Agree x 1
  13. eva2000

    eva2000 Administrator Staff Member

    30,940
    6,913
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,409
    Local Time:
    8:19 PM
    Nginx 1.13.x
    MariaDB 5.5