【Linux-ARM】arm-sgmstar-gnueabihf-9.1.0-202007-gcc交叉编译openssl、curl静态库.a与动态库.so

 编译环境:ubuntu 18.04

一、安装交叉编译器arm-sgmstar-gnueabihf-9.1.0-202007-gcc

1、下载交叉编译包

ARM交叉编译器的免安装解压包链接:

ARM交叉编译器:arm-sgmstar-gnueabihf-9.1.0-202007-gcc

tar -zxvf SSC357_arm-sgmstar-gnueabihf-9.1.0-202007.tar.gz

2、解压交叉编译包

进入解压后的文件夹内

cd gcc-sigmastar-9.1.0-2020.07-x86_64_arm-linux-gnueabihf

进入bin 文件夹

cd bin

查看路径名 

pwd

/usr/local/arm/gcc-sigmastar-9.1.0-2020.07-x86_64_arm-linux-gnueabihf/bin

 3、配置交叉编译环境变量

sudo vim /etc/profile

在文件最后添加新的一行,如下内容

export PATH=$PATH:/usr/local/arm/gcc-sigmastar-9.1.0-2020.07-x86_64_arm-linux-gnueabihf/bin

4、查看交叉编译器

重启reboot虚拟机Ubuntu,查看交叉编译器版本

arm-sgmstar-gnueabihf-9.1.0-202007-gcc -v

二、arm-sgmstar-gnueabihf-9.1.0-202007-gcc交叉编译openssl

参考博文

【Linux-ARM】安装 arm-linux-gnueabihf 交叉编译openssl-arm静态库与动态库

三、arm-sgmstar-gnueabihf-9.1.0-202007-gcc交叉编译curl

参考博文

【Linux-ARM】arm-linux-gnueabihf、arm-himix200-linux交叉编译curl-arm 静态库.a与动态库.so

1、配置Makefile文件

CPPFLAGS="-I/home/hanhui/krtcode/thirdparty/openssl/openssl-1.0.2t_sgmstar/  -I/home/hanhui/krtcode/thirdparty/openssl/openssl-1.0.2t_sgmstar/include" LDFLAGS="-L/home/hanhui/krtcode/lib/sgmstar/1.0.0/lib" LIBS="-ldl" ./configure --host=arm-sgmstar-gnueabihf CC=arm-sgmstar-gnueabihf-9.1.0-202007-gcc CXX=arm-sgmstar-gnueabihf-9.1.0-202007-g++ --with-ssl --enable-shared --enable-static --disable-dict --disable-ftp --disable-imap --disable-ldap --disable-ldaps --disable-pop3 --disable-proxy --disable-rtsp --disable-smtp --disable-telnet --disable-tftp --disable-zlib --without-ca-bundle --without-gnutls --without-libidn --without-librtmp --without-libssh2 --without-nss --without-zlib --prefix=/home/hanhui/local/curl/curl_sgmstar

CPPFLAGS="-I/home/hanhui/krtcode/thirdparty/openssl/openssl-1.0.2t_sgmstar/  -I/home/hanhui/krtcode/thirdparty/openssl/openssl-1.0.2t_sgmstar/include" LDFLAGS="-L/home/hanhui/krtcode/lib/sgmstar/1.0.0/lib" LIBS="-ldl" ./configure --host=arm-sgmstar-gnueabihf CC=arm-sgmstar-gnueabihf-9.1.0-202007-gcc CXX=arm-sgmstar-gnueabihf-9.1.0-202007-g++ --with-ssl --enable-shared --enable-static --disable-dict --disable-ftp --disable-imap --disable-ldap --disable-ldaps --disable-pop3 --disable-proxy --disable-rtsp --disable-smtp --disable-telnet --disable-tftp --disable-zlib --without-ca-bundle --without-gnutls --without-libidn --without-librtmp --without-libssh2 --without-nss --without-zlib --prefix=/home/hanhui/local/curl/curl_sgmstar

2、make编译

make -j 4

3、编译结果

ls lib/.libs

 4、查看是否ARM库

file lib/.libs/libcurl.so.4.7.0

 

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值