NGINX "--with-zlib=..." linker error

Maxim Dounin mdounin at mdounin.ru
Tue Mar 29 12:02:50 UTC 2022


Hello!

On Mon, Mar 28, 2022 at 08:25:47PM -0300, Fabiano Furtado Pessoa Coelho wrote:

> Just one more thing....
> 
> I was looking in the source code and found it:
> ...
> auto/cc/gcc:131:if [ ".$ZLIB_OPT" = "." ]; then
> auto/cc/gcc:132:    ZLIB_OPT="-O2 -fomit-frame-pointer $PIPE $CPU_OPT"
> auto/cc/gcc-133-else
> auto/cc/gcc:134:    ZLIB_OPT="$ZLIB_OPT $PIPE"
> auto/cc/gcc-135-fi
> ...
> 
> Do I need to specify "--with-zlib-opt=-fPIC -O2 -fomit-frame-pointer"
> because of these ZLIB_OPT default values?

Yes if you want to match optimizations used by nginx by default 
when building the zlib library.  But that's just optimizations, so 
it's completely optional.

-- 
Maxim Dounin
http://mdounin.ru/



More information about the nginx mailing list