|
#整理s-s一下编译过程 wget http://www.dd-wrt.com/dd-wrtv2/downloads/others/sourcecode/toolchains/current-toolchains.tar.bz2
tar jxf current-toolchains.tar.bz2
export PATH=/root/toolchain-mipsel_gcc4.1.2/bin/:$PATH
export CC=mipsel-linux-gcc
wget http://www.openssl.org/source/openssl-1.0.1e.tar.gz
tar zxf openssl-1.0.1e.tar.gz
./config no-asm --prefix=/usr/src/openssl
vi Makefile
#查找-m64参数全部删掉
make && make install
git clone https://github.com/madeye/s-s-libev.git
vi configure
#注释掉
$as_echo “#define malloc rpl_malloc" >>confdefs.h
vi libev/ev.c
#修改
#elif defined __mips__
#define ECB_MEMORY_FENCE __asm__ __volatile__ (“.set mips2; sync; .set mips0″: : :"memory")
./configure --host=mipsel-linux --with-openssl-include=/usr/src/openssl/include --with-openssl-lib=/usr/src/openssl/lib LDFLAGS=-ldl
make
#我使用的是tomato的toolchains,编译过程差不多,其中openssl参数为:
./config --prefix=/opt/usr/openssl --cross-compile-prefix=/opt/brcm/K26/hndtools-mipsel-uclibc-4.2.4/bin/mipsel-linux-shared no-asm
#s-s参数为:
./configure --host=mipsel-linux --target=mipsel-linux --prefix=/opt/usr --with-openssl-lib=/opt/usr/openssl/lib --with-openssl-include=/opt/usr/openssl/include --cache-file=linux.cache LDFLAGS="-ldl -Wl,-rpath,/opt/usr/lib"
#修改的地方差不多,只不过我是通过cache欺骗来修改的`rpl_malloc’错误,其次编译时引入了rpath,指定so文件。同时我也做了一个将openssl静态编译进去的版本,能正常工作,缺点是比较大。
#上面是 V2EX 上面整理的
#下面是我自己成功编译使用的参数
#polarssl version
git clone https://github.com/polarssl/polarssl.git
cd polarssl
./configure --prefix=/opt
make && make install
./configure --with-crypto-library=polarssl --with-polarssl=/opt/include/polarssl LDFLAGS="-Wl,-static -static -static-libgcc"
#openssl version
./configure --host=mipsel-linux --target=mipsel-linux --prefix=/opt/usr --with-openssl-lib=/opt/usr/openssl/lib --with-openssl-include=/opt/usr/openssl/include --cache-file=linux.cache LDFLAGS="-ldl -Wl,-rpath,/opt/usr/lib"
|
|