交叉编译环境搭建
交叉编译环境搭建方法见在x86_64平台上搭建龙芯MIPS64交叉编译环境
编译openssl
下载openssl
源代码
下载地址 。
以openssl-OpenSSL_1_1_1g.tar.gz
示例交叉编译openssl
。
# 解压openssl源代码
tar xf openssl-OpenSSL_1_1_1g.tar.gz
cd openssl-OpenSSL_1_1_1g
# 配置编译环境
./Configure linux64-mips64 no-asm --prefix=/opt/openssl/openssl-1.1.1g --openssldir=/opt/openssl/openssl-1.1.1g/ssl
#编译
make CROSS_COMPILE=mips64el-redhat-linux- -j4
#安装
make install
以openssl-OpenSSL_1_1_1g.tar.gz
示例在龙芯设备上编译openssl
。
# 解压openssl源代码
tar xf openssl-OpenSSL_1_1_1g.tar.gz
cd openssl-OpenSSL_1_1_1g
# 配置动态编译环境
./Configure linux64-mips64 no-asm --prefix=/opt/openssl/openssl-1.1.1g --openssldir=/opt/openssl/openssl-1.1.1g/ssl
# 编译
make -j4
# 安装
make install