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

相关推荐
特立独行的猫a1 天前
[鸿蒙PC命令行程序移植实战]:交叉编译移植最新openSSL 4.0.0到鸿蒙PC
华为·harmonyos·移植·openssl·交叉编译·鸿蒙pc
十五年专注C++开发5 天前
CMake进阶:vcpkg中OpenSSLConfig.cmake详解
c++·windows·cmake·openssl·跨平台编译
一个平凡而乐于分享的小比特5 天前
OpenSSL 全面解析:从入门到精通
密码学·openssl·隐私安全
mooyuan天天9 天前
万字详解心脏滴血漏洞复现:原理详解+环境搭建+渗透实践(CVE-2014-0160)
openssl·心脏滴血漏洞·cve-2014-0160
淮北也生橘1213 天前
Linux驱动开发:移植一个MIPI摄像头驱动并将其点亮(基于Sstar 2355平台)
linux·运维·驱动开发·嵌入式linux
bkspiderx14 天前
OpenSSL全解析:从基础原理到交叉编译与实战应用
openssl
ZXF_H1 个月前
C/C++ OpenSSL自适应格式解析证书二进制字节流
c语言·开发语言·c++·openssl
龚建波1 个月前
记录:vcpkg清单模式安装指定版本的curl和OpenSSL
openssl·curl·vcpkg
YouEmbedded1 个月前
解码ARM 开发板 OpenSSL+cURL 交叉编译与 HTTPS 配置
https·openssl·curl
吃西瓜的星星1 个月前
从0开始完成ActiveMQ-cpp在windows_x86平台的编译(从编译openssl开始)
activemq·openssl·c/c++