海思hi3531a libcurl交叉编译

作者:  使徒保罗

邮箱:   297329588@qq.com
声明:  欢迎交流学习,如有任何疑问,请通过邮箱联系本人

应用场景:海思嵌入式开发板使用静态libssh2版本库
开发环境:ubuntu 14.04 32位
功能:      编译hi3531a libssh2交叉编译库
版权声明:本文为CSDN博主「使徒保罗」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。

1.静态交叉编译openssl版本

./Configure --prefix=/home/vast/opensource/openssl-0.9.8l/build_hisiv300 \
os/compiler:/opt/hisi-linux/x86-arm/arm-hisiv300-linux/target/bin/arm-hisiv300-linux-gcc \
no-shared
 

2.静态交叉编译zlib

export CC=arm-hisiv300-linux-gcc
./configure --prefix=/home/vast/opensource/zlib-1.2.11/lib_hi3531a \
--static
 

3.静态交叉编译libssh2

.下载源码 GitHub - libssh2/libssh2: the SSH library

   版本: libssh2-libssh2-1.10.0

.解压源码包,跳转到源码根目录执行:

   ./buildconf

生成configure文件

然后配置交叉编译选项,设置configure命令:

./configure  --prefix=/home/vast/opensource/libssh2-libssh2-1.10.0/build_3531a \
--host=arm-linux \
CC=arm-hisiv300-linux-gcc \
--enable-static=yes \
--enable-shared=no \
--with-libz-prefix= /home/vast/opensource/zlib-1.2.11/lib_hi3531a \
--with-libssl-prefix=/home/vast/opensource/openssl-0.9.8l/build_hisiv300 

4.静态交叉编译libcurl

./configure --prefix=/home/vast/opensource/curl-8.0.1/libcurl_3531a \
--host=arm-hisiv300-linux \
CC=arm-hisiv300-linux-gcc \
--disable-shared \
--with-zlib="/home/vast/opensource/zlib-1.2.11/lib_hi3531a" \
--with-ssl="/home/vast/opensource/openssl-0.9.8l/build_hisiv300" \
--with-libssh2="/home/vast/opensource/libssh2-libssh2-1.10.0/build_3531a" 
然后make && make install

5.检测是否安装成功

跳转到安装目录:/home/vast/opensource/curl-8.0.1/libcurl_3531a/bin

执行: ./curl-config

表明编译成功 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

使徒保罗

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

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

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

打赏作者

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

抵扣说明:

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

余额充值