openssl交叉编译安装(arm-linux-gnueabihf)

openssl交叉编译安装(arm-linux-gnueabihf)

1.下载openssl

wget https://www.openssl.org/source/old/1.1.1/openssl-1.1.1.tar.gz

openssl交叉编译安装(arm-linux-gnueabihf)

解压到当前目录

tar xvf openssl-1.1.1.tar.gz

openssl交叉编译安装(arm-linux-gnueabihf)

 二.配置openssl

1.配置编译的参数

export PATH=$PATH:/opt/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin/

openssl交叉编译安装(arm-linux-gnueabihf)

2.执行下面的命令配置工程

./config no-asm shared no-async --prefix=$(pwd)/install --cross-compile-prefix=arm-linux-gnueabihf-

其参数说明如下:

no-asm:  在交叉编译过程中不使用汇编代码代码加速编译过程;

shared: 生成动态连接库。

no-async: 交叉编译工具链没有提供GNU C的ucontext库

–prefix=: 安装路径

–cross-compile-prefix=: 交叉编译工具

 openssl交叉编译安装(arm-linux-gnueabihf)

 二.编译

1.执行编译命令

make

openssl交叉编译安装(arm-linux-gnueabihf)

 发生如图上的错误,删除所有-m64参数

openssl交叉编译安装(arm-linux-gnueabihf)

 重新执行编译,OK.