Welcome! Log In Create A New Profile

Advanced

Cross Compiling Nginx

Doug Kehn
December 28, 2011 10:48AM
Hi All,

I'm cross compiling Nginx for an ARM Cortex A8 processor.  Attached is a patch for review which allows Nginx to be cross compiled.  I believe the patch is generic enough to allow Nginx to be cross compiled in any cross compile environment.  I also don't believe that I've broken any existing functionality.  After applying the patch, Nginx can be cross compiled with:

./configure \--prefix= \

--crossbuild=Linux:$(ARCH) \
--with-cc-opt="$(CFLAGS)" \
--with-ld-opt="$(LDFLAGS)" \
--with-endian=$(ENDIAN) \
--with-int=4 \
--with-long=4 \
--with-long-long=8 \
--with-ptr-size=4 \
--with-sig-atomic-t=4 \
--with-size-t=4 \
--with-off-t=4 \
--with-time-t=4 \
--with-sys-nerr=132
make

In my case $(ARCH) = arm, $(ENDIAN) = little, and $(CFLAGS)/$(LDFLAGS) are set according to my environment.  The variable sizes were determined empirically by cross compiling a simple program and executing on the target.

Regards,
...doug_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Cross Compiling Nginx Attachments

Doug Kehn 7703 December 28, 2011 10:48AM

Re: Cross Compiling Nginx

Maxim Dounin 3027 December 28, 2011 12:42PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 145
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready