arm-xm-linux交叉编译openssl

编译环境

Ubuntu 16.04 x86_64
arm-xm-linux.tar.gz

下载openssl源码

$ wget https://www.openssl.org/source/openssl-1.1.0d.tar.gz

解压源码

$ tar xvf openssl-1.1.0d.tar.gz

执行Configure脚本

$ cd openssl
$ ./Configure linux-generic32  \
	no-shared \
	no-asm \
	no-async \
	--prefix=/your/install/path/xm/openssl_1.1.0d \
	--cross-compile-prefix=arm-xm-linux-
  • linux-generic32 指定目标平台类型,

  • no-shared 生成静态库,如果要生成动态库,则使用-shared选项

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

  • –prefix 指定安装目录

  • –cross-compile-prefix 指定交叉编译器名字前缀

  • no-async arm-xm-linux的machine定义为arm-xm-linux-ulibcgnueabi,没有提供GNU C的ucontext库所以需要添加此选项,否则编译会报错

./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'

编译安装

make 
make install
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

10km

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值