一,下载源码
[ Old Releases ] - /source/old/index.html
二,设置交叉编译环境
我的交叉环境是RV1126开发板,/home/rpdzkj/development/cross-compile-tools/rv1126/ 对应的是我电脑里的RV1126开发板的交叉环境下的gc g++等路径存放
设置环境的脚本如下
#!/bin/sh
export CC=/home/rpdzkj/development/cross-compile-tools/rv1126/bin/arm-linux-gnueabihf-gcc
export CXX=/home/rpdzkj/development/cross-compile-tools/rv1126/bin/arm-linux-gnueabihf-g++
export AR=/home/rpdzkj/development/cross-compile-tools/rv1126/bin/arm-linux-gnueabihf-ar
export AS=/home/rpdzkj/development/cross-compile-tools/rv1126/bin/arm-linux-gnueabihf-as
export LD=/home/rpdzkj/development/cross-compile-tools/rv1126/bin/arm-linux-gnueabihf-ld
export RANLIB=/home/rpdzkj/development/cross-compile-tools/rv1126/bin/arm-linux-gnueabihf-ranlib
export STRIP=/home/rpdzkj/development/cross-compile-tools/rv1126/bin/arm-linux-gnueabihf-strip
./config no-asm -shared
三,make 编译
此时会报错
所以我们需要修改生成的MakeFile文件将-m64去掉
将Makefile里这两个-m64删掉
重新编译 make
此时就会在源码目录声场libssl.so 和libcrypto.so文件
此时我们file命令看一下这两个库的属性,可以看到的确是arm平台的