openssl交叉编译

openssl交叉编译


Chapter1 openssl交叉编译

1、openssl源码包下载

http://ftp.openssl.org/source/

http://distfiles.macports.org/openssl/

2、Ubuntu编译与安装openssl

bash 复制代码
# openssl库默认安装路径为:/usr/local/ssl/lib
tar zxvf openssl-1.1.1t.tar.gz
cd openssl-1.1.1t.tar.gz
./config -shared
make
sudo make install

3、交叉编译

执行下面的命令配置工程

bash 复制代码
./config no-asm shared no-async --prefix=$(pwd)/install --cross-compile-prefix=arm-linux-

参数说明

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

shared: 生成动态连接库。

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

--prefix=: 安装路径

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

注意:打开Makefile,删除里面所有的-m64和-m32编译选项。

执行完config后,会在build下生成很多文件,打开其中的Makefile,找到"-m64"并删除,否则下一步会遇到错误:

bash 复制代码
aarch64-buildroot-linux-gnu-gcc.br_real: error: unrecognized command line option '-m64'

编译安装

bash 复制代码
make
make install

参考连接

参考连接1

相关推荐
鹏大师运维3 天前
统信 UOS OpenSSL 漏洞如何修复?外网 / 内网两种方式一次讲清
linux·运维·openssl·国产操作系统·统信uos·麒麟桌面操作系统·补丁修复
小麻侬3 天前
CMake gui构建libcurl,MTD/MT,支持openssl
openssl·libcurl·cmake gui
前进的程序员3 天前
OpenSSL加解密原理及使用方法详解
ssl·加解密·openssl
y1233447788999 天前
国密算法SM2实现(Openssl)
开发语言·openssl·国密
EniacCheng12 天前
【OpenSSL】- Ubuntu22.04手动编译安装openssl
openssl
REDcker15 天前
OpenSSL 完整文档
c++·安全·github·c·openssl·后端开发
~光~~16 天前
【嵌入式linux学习】05_设备驱动 IO 控制原理
嵌入式linux·设备驱动io
~光~~16 天前
【嵌入式linux学习】04_Pinctrl 和 GPIO子系统
linux·rk3588·嵌入式linux
hugerat1 个月前
在AI的帮助下,用C++构造微型http server
linux·c++·人工智能·http·嵌入式·嵌入式linux
特立独行的猫a1 个月前
[鸿蒙PC命令行程序移植实战]:交叉编译移植最新openSSL 4.0.0到鸿蒙PC
华为·harmonyos·移植·openssl·交叉编译·鸿蒙pc