• About

Customizing NGINX Debian Build

February 4th, 2009

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:


I also added "-mtune=geode" to the debian/rules file. In the case that I use a machine with an intel atom (i686 or the like) or a via c7[1] (-march=i686 -mmmx -msse -msse2 -msse3), I would obviously change the -march flag. [2]

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


  3. Via Padlock OCF-Linux Integration
Yearly Indexes: 2010 2003 2005 2006 2007 2008 2009 2004 2011 2012 2013 2015 2019 2020