Update NSS to latest
This commit is contained in:
Родитель
75b7ab746d
Коммит
8c74193ffe
|
@ -122,9 +122,11 @@ fn get_nss_libs(kind: &LinkingKind) -> Vec<&'static str> {
|
||||||
// Hardware specific libs.
|
// Hardware specific libs.
|
||||||
let target_arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap();
|
let target_arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap();
|
||||||
let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap();
|
let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap();
|
||||||
// https://searchfox.org/mozilla-central/rev/1eb05019f47069172ba81a6c108a584a409a24ea/security/nss/lib/freebl/freebl.gyp#159-163
|
// https://searchfox.org/mozilla-central/rev/1eb05019f47069172ba81a6c108a584a409a24ea/security/nss/lib/freebl/freebl.gyp#159-168
|
||||||
if target_arch == "x86_64" || target_arch == "x86" {
|
if target_arch == "x86_64" || target_arch == "x86" {
|
||||||
static_libs.push("gcm-aes-x86_c_lib");
|
static_libs.push("gcm-aes-x86_c_lib");
|
||||||
|
} else if target_arch == "aarch64" {
|
||||||
|
static_libs.push("gcm-aes-aarch64_c_lib");
|
||||||
}
|
}
|
||||||
// https://searchfox.org/mozilla-central/rev/1eb05019f47069172ba81a6c108a584a409a24ea/security/nss/lib/freebl/freebl.gyp#224-233
|
// https://searchfox.org/mozilla-central/rev/1eb05019f47069172ba81a6c108a584a409a24ea/security/nss/lib/freebl/freebl.gyp#224-233
|
||||||
if ((target_os == "android" || target_os == "linux") && target_arch == "x86_64")
|
if ((target_os == "android" || target_os == "linux") && target_arch == "x86_64")
|
||||||
|
|
|
@ -64,6 +64,7 @@ universal_lib "nss" "libplds4.a" "${TARGET_ARCHS[@]}"
|
||||||
universal_lib "nss" "libssl.a" "${TARGET_ARCHS[@]}"
|
universal_lib "nss" "libssl.a" "${TARGET_ARCHS[@]}"
|
||||||
universal_lib "nss" "libhw-acc-crypto.a" "${TARGET_ARCHS[@]}"
|
universal_lib "nss" "libhw-acc-crypto.a" "${TARGET_ARCHS[@]}"
|
||||||
universal_lib "nss" "libgcm-aes-x86_c_lib.a" "x86_64"
|
universal_lib "nss" "libgcm-aes-x86_c_lib.a" "x86_64"
|
||||||
|
universal_lib "nss" "libgcm-aes-aarch64_c_lib.a" "arm64"
|
||||||
|
|
||||||
echo "# Building openssl"
|
echo "# Building openssl"
|
||||||
for i in "${!TARGET_ARCHS[@]}"; do
|
for i in "${!TARGET_ARCHS[@]}"; do
|
||||||
|
|
|
@ -80,7 +80,7 @@ SQLCIPHER_SRC_PATH=$(abspath "sqlcipher")
|
||||||
|
|
||||||
rm -rf "${NSS}"
|
rm -rf "${NSS}"
|
||||||
# Delete the following...
|
# Delete the following...
|
||||||
hg clone https://hg.mozilla.org/projects/nss/ -r 0c5d37301637ed024de8c2cbdbecf144aae12163 "${NSS}"/nss
|
hg clone https://hg.mozilla.org/projects/nss/ -r caf5d97f786fc3dad2f9318b228007a233b5f0bd "${NSS}"/nss
|
||||||
# Temporary fix for bug 1561953
|
# Temporary fix for bug 1561953
|
||||||
git clone --single-branch --branch without-versions https://github.com/eoger/nspr.git "${NSS}"/nspr
|
git clone --single-branch --branch without-versions https://github.com/eoger/nspr.git "${NSS}"/nspr
|
||||||
# hg clone https://hg.mozilla.org/projects/nspr/ -r cc73b6c7dab2e8053533e1f2c0c23dc721e10b76 "${NSS}"/nspr
|
# hg clone https://hg.mozilla.org/projects/nspr/ -r cc73b6c7dab2e8053533e1f2c0c23dc721e10b76 "${NSS}"/nspr
|
||||||
|
|
|
@ -115,6 +115,8 @@ cp -p -L "${BUILD_DIR}/lib/libhw-acc-crypto.a" "${DIST_DIR}/lib"
|
||||||
# https://searchfox.org/mozilla-central/rev/1eb05019f47069172ba81a6c108a584a409a24ea/security/nss/lib/freebl/freebl.gyp#159-163
|
# https://searchfox.org/mozilla-central/rev/1eb05019f47069172ba81a6c108a584a409a24ea/security/nss/lib/freebl/freebl.gyp#159-163
|
||||||
if [[ "${TOOLCHAIN}" == "i686-linux-android" ]] || [[ "${TOOLCHAIN}" == "x86_64-linux-android" ]]; then
|
if [[ "${TOOLCHAIN}" == "i686-linux-android" ]] || [[ "${TOOLCHAIN}" == "x86_64-linux-android" ]]; then
|
||||||
cp -p -L "${BUILD_DIR}/lib/libgcm-aes-x86_c_lib.a" "${DIST_DIR}/lib"
|
cp -p -L "${BUILD_DIR}/lib/libgcm-aes-x86_c_lib.a" "${DIST_DIR}/lib"
|
||||||
|
elif [[ "${TOOLCHAIN}" == "aarch64-linux-android" ]]; then
|
||||||
|
cp -p -L "${BUILD_DIR}/lib/libgcm-aes-aarch64_c_lib.a" "${DIST_DIR}/lib"
|
||||||
fi
|
fi
|
||||||
# https://searchfox.org/mozilla-central/rev/1eb05019f47069172ba81a6c108a584a409a24ea/security/nss/lib/freebl/freebl.gyp#224-228
|
# https://searchfox.org/mozilla-central/rev/1eb05019f47069172ba81a6c108a584a409a24ea/security/nss/lib/freebl/freebl.gyp#224-228
|
||||||
# https://searchfox.org/mozilla-central/rev/1eb05019f47069172ba81a6c108a584a409a24ea/security/nss/lib/freebl/freebl.gyp#43-47
|
# https://searchfox.org/mozilla-central/rev/1eb05019f47069172ba81a6c108a584a409a24ea/security/nss/lib/freebl/freebl.gyp#43-47
|
||||||
|
|
|
@ -104,6 +104,8 @@ cp -p -L "${BUILD_DIR}/lib/libhw-acc-crypto.a" "${DIST_DIR}/lib"
|
||||||
# HW specific.
|
# HW specific.
|
||||||
if [[ "${ARCH}" == "x86_64" ]]; then
|
if [[ "${ARCH}" == "x86_64" ]]; then
|
||||||
cp -p -L "${BUILD_DIR}/lib/libgcm-aes-x86_c_lib.a" "${DIST_DIR}/lib"
|
cp -p -L "${BUILD_DIR}/lib/libgcm-aes-x86_c_lib.a" "${DIST_DIR}/lib"
|
||||||
|
elif [[ "${ARCH}" == "arm64" ]]; then
|
||||||
|
cp -p -L "${BUILD_DIR}/lib/libgcm-aes-aarch64_c_lib.a" "${DIST_DIR}/lib"
|
||||||
fi
|
fi
|
||||||
cp -p -L "${NSPR_BUILD_DIR}/dist/lib/libplc4.a" "${DIST_DIR}/lib"
|
cp -p -L "${NSPR_BUILD_DIR}/dist/lib/libplc4.a" "${DIST_DIR}/lib"
|
||||||
cp -p -L "${NSPR_BUILD_DIR}/dist/lib/libplds4.a" "${DIST_DIR}/lib"
|
cp -p -L "${NSPR_BUILD_DIR}/dist/lib/libplds4.a" "${DIST_DIR}/lib"
|
||||||
|
|
|
@ -99,6 +99,8 @@ LIBS="\
|
||||||
|
|
||||||
if [[ "${TOOLCHAIN}" == "x86_64-linux-android" ]] || [[ "${TOOLCHAIN}" == "i686-linux-android" ]]; then
|
if [[ "${TOOLCHAIN}" == "x86_64-linux-android" ]] || [[ "${TOOLCHAIN}" == "i686-linux-android" ]]; then
|
||||||
LIBS="${LIBS} -lgcm-aes-x86_c_lib"
|
LIBS="${LIBS} -lgcm-aes-x86_c_lib"
|
||||||
|
elif [[ "${TOOLCHAIN}" == "aarch64-linux-android" ]]; then
|
||||||
|
LIBS="${LIBS} -lgcm-aes-aarch64_c_lib"
|
||||||
fi
|
fi
|
||||||
if [[ "${TOOLCHAIN}" == "x86_64-linux-android" ]]; then
|
if [[ "${TOOLCHAIN}" == "x86_64-linux-android" ]]; then
|
||||||
LIBS="${LIBS} -lintel-gcm-wrap_c_lib -lintel-gcm-s_lib"
|
LIBS="${LIBS} -lintel-gcm-wrap_c_lib -lintel-gcm-s_lib"
|
||||||
|
|
|
@ -114,6 +114,8 @@ LIBS="\
|
||||||
|
|
||||||
if [[ "${ARCH}" == "x86_64" ]]; then
|
if [[ "${ARCH}" == "x86_64" ]]; then
|
||||||
LIBS="${LIBS} -lgcm-aes-x86_c_lib"
|
LIBS="${LIBS} -lgcm-aes-x86_c_lib"
|
||||||
|
else
|
||||||
|
LIBS="${LIBS} -lgcm-aes-aarch64_c_lib"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
BUILD_DIR=$(mktemp -d)
|
BUILD_DIR=$(mktemp -d)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче