Thursday, August 14, 2014

Modifying gcc optimizations while building nginx for debugging

Sometimes, during debugging I needed to disable optimizations. It took me a few searches to figure it out. So here is a short summary for anyone else who may face the same issue

Go to nginx/auto/cc/gcc file. Modify the CFLAGS to not include the variable NGX_GCC_OPT
In my (already modified Makefile) it was like this
 #CFLAGS="$CFLAGS ${NGX_GCC_OPT:--O} -W  


which I changed to this
 CFLAGS="$CFLAGS ;-W  

No comments:

Post a Comment