Files

19 lines
814 B
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# BearSSL — 官方 git(https://www.bearssl.org/git/BearSSL)。许可 MIT。
# 使用 make lib 编译出 libbearssl.a(含 int/core/codec/ec/rsa/symcipher/ssl/x509)。
. ./libs_common.sh
SRC="$VENDOR/bearssl"
D="$OUT/bearssl/mipsel"; mkdir -p "$D"
# 在源码内建一个专用 build 目录,避免污染
BM="$D/bm"; rm -rf "$BM"; mkdir -p "$BM"
make -C "$SRC" lib \
BUILD="$BM" \
CC="$CC_MIPS" \
AR="$AR_MIPS" \
RANLIB="$AR_MIPS ranlib" \
CFLAGS="-Os -Wno-unused-parameter -fno-stack-protector -ffunction-sections -fdata-sections" \
LD="$CC_MIPS" 2>&1 | tail -15
echo "make exit=${PIPESTATUS[0]}"
echo "=== lib list ==="; ls -la "$BM/"
case "x$(ls "$BM"/*.a 2>/dev/null)" in x) echo "no .a produced";; *) echo "=== BearSSL (mipsel) ==="; measure_archive "$BM/libbearssl.a";; esac