Cross Build PHP 5.2.5
| From: | Pete Klemm | Date: | Mon, 28 Jan 2008 22:36:26 +0000 |
| Subject: | Cross Build PHP 5.2.5 | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-34987@lists.php.net to get a copy of this message | ||
I am trying to cross compile PHP 5.2.5. I have tried many combinations of parameters
to configure, but find that the build keeps wanting to use native tools or link with native
libraries. Has anyone been successful in cross compiling for ARM. I intend to use PHP
on an embedded web server and would like to tune the PHP build to just bring in the
options I need.
I call configure with the following arguments:
CC="arm-unknown-linux-gnu-gcc" \
CXX="arm-unknown-linux-gnu-g++" \
PREFIX="opt/crosstool/gcc-4.0.2-glibc-2.3.6/arm-unknown-linux-gnu/arm-unknown-linux-gnu" \
RANLIB="arm-unknown-linux-gnu-ranlib" \
LIBS="-L/opt/crosstool/gcc-4.0.2-glibc-2.3.6/arm-unknown-linux-gnu/arm-unknown-linux-gnu/lib" \
CFLAGS="-I/opt/crosstool/gcc-4.0.2-glibc-2.3.6/arm-unknown-linux-gnu/arm-unknown-linux-gnu/include -I/opt/crosstool/gcc-4.0.2-glibc-2.3.6/arm-unknown-linux-gnu/include" \
./configure \
--host=arm-unknown-linux-gnu \
--prefix=/opt/crosstool/gcc-4.0.2-glibc-2.3.6/arm-unknown-linux-gnu/arm-unknown-linux-gnu \
--oldincludedir=/opt/crosstool/gcc-4.0.2-glibc-2.3.6/arm-unknown-linux-gnu/arm-unknown-linux-gnu/include \
--with-libdir=/opt/crosstool/gcc-4.0.2-glibc-2.3.6/arm-unknown-linux-gnu/arm-unknown-linux-gnu/lib \
--with-includedir=/opt/crosstool/gcc-4.0.2-glibc-2.3.6/arm-unknown-linux-gnu/arm-unknown-linux-gnu/include \
--disable-ipv6 \
--without-openssl \
--without-curl \
--with-gettext \
--without-kerberos \
--without-ldap \
--disable-mbstring \
--without-mcrypt \
--without-mhash \
--without-mysql \
--enable-sockets \
--without-pdo-sqlite \
--without-sqlite \
--without-xml \
--with-pear=shared,/opt/crosstool/gcc-4.0.2-glibc-2.3.6/arm-unknown-linux-gnu/arm-unknown-linux-gnu \
--enable-libgcc \
--enable-posix
Thanks for your help,
Pete