我尝试在x86_64 linux上交叉编译PHP 5.3.25 for arm-merlin。
我的configure命令如下所示:
export CC=/opt/mobilygen/tools/arm-merlin-linux-uclibc/i686-linux/bin/arm-merlin-linux-uclibc-gcc
./configure --prefix=/opt/php --host=arm-merlin-linux-uclibc --target=arm-merlin-linux-uclibc --build=x86_64-linux --without-iconv --without-pear --disable-ipv6 --without-openssl --without-sqlite --without-sqlite3 --disable-pdo --without-pdo-sqlite --with-libxml-dir=/opt/libxml2/ --includedir=/opt/mobilygen/tools/arm-merlin-linux-uclibc-SDK7r4552/i686-linux/arm-merlin-linux-uclibc/usr/include
链接器失败:
ext/standard/php_crypt_r.o: In function `_crypt_extended_init_r':
/projects/php/php-5.3.25/ext/standard/php_crypt_r.c:101: undefined reference to `membar_producer'
/projects/php/php-5.3.25/ext/standard/php_crypt_r.c:102: undefined reference to `atomic_add_int'
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php-cgi] Error 1
SDK似乎没有提供正确的sys / atomic.h库。 这有解决方法吗?如果剥离MD5功能也可以。