I'm building a more recent version of NGINX to take advantage of its xsl module, and while I'm at it I'm customizing the gcc flags, since the installation target is embedded, low-power systems, where every little bit counts!
The usual:
apt-get source nginx
Then I downloaded the source from the internet manually, copied over the debian/ directory, changed a few version numbers, and then did some internal adjusting:
vim auto/cc/gcc
I added these:
NGX_GCC_OPT="-Os" CPU_OPT="-march=geode"
I also removed the ssl module from the configure line in debian/rules as I want to use pound as an ssl proxy - it can use specific openssl engines, as described here[3]. I also removed the flv module.
Example resulting command:
gcc -c -Os -pipe -march=geode -Os -W -Wall -Wpointer-arith -Wno-unused-parameter -Wno-unused-function -Wunused-variable -Wunused-value -Werror -g -mtune=geode -I src/core -I src/event -I src/event/modules -I src/os/unix -I /usr/include/libxml2 -I objs \ -o objs/src/os/unix/ngx_user.o \ src/os/unix/ngx_user.c
References: