交叉编译器:mipsel-linux-uclibc-gcc
环境:suse 9
1.下载解压
2.配置:
#./config linux-mipsel-ti:mipsel-linux-uclibc-gcc --prefix=/home/openssl-1.0.0g/target/ no-threads shared -DOPENSSL_NO_STATIC_ENGINE no-hw no-zlib no-asm no-dso no-krb5 -O2
注:OPENSSL_NO_STATIC_ENGINE,配置该选项时因为编译时出现undefined reference to `ENGINE_load_aep'之类的错误
3.编译
由于需要编译成动态库,默认config不支持该平台,因此需要修改Makefile:
SHLIB_EXT=.so.$(SHLIB_MAJOR).$(SHLIB_MINOR)
SHARED_LIBS=$(SHARED_CRYPTO) $(SHARED_SSL)
SHARED_LIBS_LINK_EXTS=.so.$(SHLIB_MAJOR) .so
SHLIB_TARGET=linux-shared
#make
即可生成libssl.so、libssl.so.1.0.0、libcrypto.so和libcrypto.so.1.0.0