diff options
author | mrg <mrg@pkgsrc.org> | 2021-09-01 09:40:46 +0000 |
---|---|---|
committer | mrg <mrg@pkgsrc.org> | 2021-09-01 09:40:46 +0000 |
commit | 3d0844a12e96047a38e47e09ad987a4776197f25 (patch) | |
tree | 34ba6e3569b696b4e34ccc1bb03699dfc24c9be4 | |
parent | a3d89bdb75a2cb955154c8b7ec87913aa4cdbcff (diff) | |
download | pkgsrc-3d0844a12e96047a38e47e09ad987a4776197f25.tar.gz |
re-do this patch using a GCC defined macro.
this is still wrong, but it's less wrong than before and once again
both arm64 and arm64eb (and amd64) build.
this is really strange. the code in sha512.c uses:
#if !defined(USE_HW_SHA2) || !defined(IS_LITTLE_ENDIAN)
which originally this patch attempted to match, but IS_LITTLE_ENDIAN
is never defined inside nss, even though it's used a few dozen times.
there is a MP_IS_LITTLE_ENDIAN defined that is setup, but almost
never used.
-rw-r--r-- | devel/nss/distinfo | 4 | ||||
-rw-r--r-- | devel/nss/patches/patch-nss_lib_freebl_sha256-armv8.c | 20 |
2 files changed, 17 insertions, 7 deletions
diff --git a/devel/nss/distinfo b/devel/nss/distinfo index 90b65abc9f9..fae198657ff 100644 --- a/devel/nss/distinfo +++ b/devel/nss/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.136 2021/08/31 11:12:30 wiz Exp $ +$NetBSD: distinfo,v 1.137 2021/09/01 09:40:46 mrg Exp $ SHA1 (nss-3.69.1.tar.gz) = 7fea2bd8db2f0125fa9bc58ead08164fbd7384c2 RMD160 (nss-3.69.1.tar.gz) = 5ba111b08462c82f4e933acc74b6810f7a27dbad @@ -14,7 +14,7 @@ SHA1 (patch-nss_coreconf_OpenBSD.mk) = 944f71fcaaa7d5b2b3ed008341b1392a65480f2b SHA1 (patch-nss_coreconf_command.mk) = a7b682d367825b48f8802fa30cee83f10680bb74 SHA1 (patch-nss_lib_freebl_aes-armv8.c) = aa698f61dd3d66ba707a9b5425bc15d057244ad7 SHA1 (patch-nss_lib_freebl_gcm-aarch64.c) = 311cfe7ca58e91285052d0ca27bd2df3f325071b -SHA1 (patch-nss_lib_freebl_sha256-armv8.c) = 1322fcbe79790d313af622e40a9139943d83134f +SHA1 (patch-nss_lib_freebl_sha256-armv8.c) = 48ec50204493dd510099a3495f3b775c6bfa8828 SHA1 (patch-nss_lib_util_utilpars.c) = 5d3000515b01037929730a752b7d7a0f46f06deb SHA1 (patch-nss_tests_all.sh) = b328778b538db66f5447f962f23afd6f650f7071 SHA1 (patch-nss_tests_merge_merge.sh) = 42a4866d226b1076740ba9a5e42c7604f2cb15a7 diff --git a/devel/nss/patches/patch-nss_lib_freebl_sha256-armv8.c b/devel/nss/patches/patch-nss_lib_freebl_sha256-armv8.c index 1ac8ae02f6b..7aa42a34057 100644 --- a/devel/nss/patches/patch-nss_lib_freebl_sha256-armv8.c +++ b/devel/nss/patches/patch-nss_lib_freebl_sha256-armv8.c @@ -1,18 +1,28 @@ -$NetBSD: patch-nss_lib_freebl_sha256-armv8.c,v 1.2 2021/08/31 11:12:30 wiz Exp $ +$NetBSD: patch-nss_lib_freebl_sha256-armv8.c,v 1.3 2021/09/01 09:40:46 mrg Exp $ + -date: 2021-08-27 23:33:18 +0200; author: mrg; state: Exp; commitid: r84ANY9lYgSAJE6D; fix build on arm64eb: sha512.c and sha256-armv8.c both provided the same symbols. (sha256-x86.c has the same problem, but that file already requires little endian so is not a big deal.) +XXX this is really strange. the code in sha512.c uses: + +#if !defined(USE_HW_SHA2) || !defined(IS_LITTLE_ENDIAN) + +which originally this patch attempted to match, but IS_LITTLE_ENDIAN +is never defined inside nss, even though it's used a few dozen times. +there is a MP_IS_LITTLE_ENDIAN defined that is setup, but almost +never used. + + --- nss/lib/freebl/sha256-armv8.c.orig 2021-08-05 01:03:36.000000000 -0700 -+++ nss/lib/freebl/sha256-armv8.c 2021-08-27 14:21:56.160037512 -0700 ++++ nss/lib/freebl/sha256-armv8.c 2021-09-01 01:59:50.464034605 -0700 @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifdef USE_HW_SHA2 -+#if defined(USE_HW_SHA2) && defined(IS_LITTLE_ENDIAN) ++#if defined(USE_HW_SHA2) && !defined(__ARM_BIG_ENDIAN) #ifndef __ARM_FEATURE_CRYPTO #error "Compiler option is invalid" @@ -21,4 +31,4 @@ already requires little endian so is not a big deal.) } -#endif /* USE_HW_SHA2 */ -+#endif /* USE_HW_SHA2 && IS_LITTLE_ENDIAN */ ++#endif /* USE_HW_SHA2 && !__ARM_BIG_ENDIAN */ |