From f512836b78eafd9ea3cba1e3fa5d91c0e611a69d Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Mon, 17 Feb 2020 14:29:52 +0100 Subject: [PATCH] Fix build on ppc64le, due to bundled kremlin source --- nss-kremlin-ppc64le.patch | 26 ++++++++++++++++++++++++++ nss.spec | 6 ++++-- 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 nss-kremlin-ppc64le.patch diff --git a/nss-kremlin-ppc64le.patch b/nss-kremlin-ppc64le.patch new file mode 100644 index 0000000..d5fe2eb --- /dev/null +++ b/nss-kremlin-ppc64le.patch @@ -0,0 +1,26 @@ +diff -up nss/lib/freebl/verified/kremlin/include/kremlin/internal/types.h.kremlin-ppc64 nss/lib/freebl/verified/kremlin/include/kremlin/internal/types.h +--- nss/lib/freebl/verified/kremlin/include/kremlin/internal/types.h.kremlin-ppc64 2020-02-17 14:15:27.996130995 +0100 ++++ nss/lib/freebl/verified/kremlin/include/kremlin/internal/types.h 2020-02-17 14:17:18.138486010 +0100 +@@ -56,7 +56,8 @@ typedef const char *Prims_string; + #include + typedef __m128i FStar_UInt128_uint128; + #elif !defined(KRML_VERIFIED_UINT128) && !defined(_MSC_VER) && \ +- (defined(__x86_64__) || defined(__x86_64) || defined(__aarch64__)) ++ (defined(__x86_64__) || defined(__x86_64) || defined(__aarch64__) || \ ++ (defined(__powerpc64__) && defined(__LITTLE_ENDIAN__))) + typedef unsigned __int128 FStar_UInt128_uint128; + #else + typedef struct FStar_UInt128_uint128_s { +diff -up nss/lib/freebl/verified/kremlin/kremlib/dist/minimal/fstar_uint128_gcc64.h.kremlin-ppc64 nss/lib/freebl/verified/kremlin/kremlib/dist/minimal/fstar_uint128_gcc64.h +--- nss/lib/freebl/verified/kremlin/kremlib/dist/minimal/fstar_uint128_gcc64.h.kremlin-ppc64 2020-02-17 14:15:55.389468034 +0100 ++++ nss/lib/freebl/verified/kremlin/kremlib/dist/minimal/fstar_uint128_gcc64.h 2020-02-17 14:19:16.830951610 +0100 +@@ -25,7 +25,8 @@ + #include "LowStar_Endianness.h" + + #if !defined(KRML_VERIFIED_UINT128) && !defined(_MSC_VER) && \ +- (defined(__x86_64__) || defined(__x86_64) || defined(__aarch64__)) ++ (defined(__x86_64__) || defined(__x86_64) || defined(__aarch64__) || \ ++ (defined(__powerpc64__) && defined(__LITTLE_ENDIAN__))) + + /* GCC + using native unsigned __int128 support */ + diff --git a/nss.spec b/nss.spec index ac65b3d..fb1a4c1 100644 --- a/nss.spec +++ b/nss.spec @@ -43,7 +43,7 @@ rpm.define(string.format("nss_release_tag NSS_%s_RTM", Summary: Network Security Services Name: nss Version: %{nss_version} -Release: 3%{?dist} +Release: 1%{?dist} License: MPLv2.0 URL: http://www.mozilla.org/projects/security/pki/nss/ Requires: nspr >= %{nspr_version} @@ -113,6 +113,8 @@ Patch10: nss-3.47-ike-fix.patch # support in PKCS #11. Patch11: nss-tls13-default.patch Patch12: nss-signtool-format.patch +# https://github.com/FStarLang/kremlin/issues/166 +Patch13: nss-kremlin-ppc64le.patch %description Network Security Services (NSS) is a set of libraries designed to @@ -884,7 +886,7 @@ update-crypto-policies &> /dev/null || : %changelog -* Mon Feb 17 2020 Daiki Ueno - 3.50.0-3 +* Mon Feb 17 2020 Daiki Ueno - 3.50.0-1 - Update to NSS 3.50 * Fri Feb 14 2020 Daiki Ueno - 3.49.2-3