openssl 源码下载 [ 3.2 ] - /source/old/3.2/index.html (openssl.org)
一、交叉编译器
export PATH=$PATH:/opt/toolchain/gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf/bin
export ARCH=arm
export CROSS_COMPILE=/opt/toolchain/gcc-linaro-4.9-2014.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
二、配置config
./config no-asm shared --prefix=/workstation/openssl-build --cross-compile-prefix=arm-linux-gnueabihf-
三、修改编译错误
1、-m64 报错,修改 Mackfile 删除 -m64 相关
2、warning: left shift count >= width of type
crypto/bn/bn_dh.c:653:5: warning: left shift count >= width of type
BN_DEF(0x6519035B, 0xDE355B3B), BN_DEF(0x611FCFDC, 0x886B4238),
^
修改 原来的 unsigned long 改为 unsigned long long
include/openssl/bn.h # ifdef SIXTY_FOUR_BIT_LONG # define BN_ULONG unsigned long long # define BN_BYTES 8 # endif