在https://www.openssl.org/source/下载openssl-1.1.1源代码
# tar zxvf openssl-1.1.1.tar.gz
# cd openssl-1.1.1
# mkdir build_arm
# ./config no-asm shared no-async --prefix=/home/wenyi/development/soft_arm/openssl-1.1.1/build_arm --cross-compile-prefix=arm-hisiv500-linux- 生成makefile文件
修改makefile,去除掉 -m64和-m32选项
# make && make install
【错误描述】:
./libcrypto.so: warning: gethostbyname is obsolescent, use getnameinfo() instead.
./libcrypto.so: undefined reference to `getcontext'
./libcrypto.so: undefined reference to `setcontext'
./libcrypto.so: undefined reference to `makecontext'
【错误原因】:
之前config使用:
./config no-asm shared --prefix=/home/wenyi/development/soft_arm/openssl-1.1.1/build_arm --cross-compile-prefix=arm-hisiv500-linux-
没有使用 no-async 参数,加上之后就可以了。
【参数说明】
- no-asm: 在交叉编译过程中不使用汇编代码代码加速编译过程.原因是它的汇编代码是对arm格式不支持的。
- shared: 生成动态连接库。
- no-async: 交叉编译工具链没有提供GNU C的ucontext库
- –prefix=: 安装路径,编译完成install后将有bin,lib,include等文件夹
- –cross-compile-prefix=: 交叉编译工具