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

2023-05-16

 编译环境: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

 

 

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

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

随机推荐