pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/nss re-do this patch using a GCC defined macro.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6d27b7fadf41
branches:  trunk
changeset: 457810:6d27b7fadf41
user:      mrg <mrg%pkgsrc.org@localhost>
date:      Wed Sep 01 09:40:46 2021 +0000

description:
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.

diffstat:

 devel/nss/distinfo                                    |   4 +-
 devel/nss/patches/patch-nss_lib_freebl_sha256-armv8.c |  20 ++++++++++++++----
 2 files changed, 17 insertions(+), 7 deletions(-)

diffs (60 lines):

diff -r 91c57bb6e4f7 -r 6d27b7fadf41 devel/nss/distinfo
--- a/devel/nss/distinfo        Wed Sep 01 06:59:07 2021 +0000
+++ b/devel/nss/distinfo        Wed Sep 01 09:40:46 2021 +0000
@@ -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_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 -r 91c57bb6e4f7 -r 6d27b7fadf41 devel/nss/patches/patch-nss_lib_freebl_sha256-armv8.c
--- a/devel/nss/patches/patch-nss_lib_freebl_sha256-armv8.c     Wed Sep 01 06:59:07 2021 +0000
+++ b/devel/nss/patches/patch-nss_lib_freebl_sha256-armv8.c     Wed Sep 01 09:40:46 2021 +0000
@@ -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 @@
  }
  
 -#endif /* USE_HW_SHA2 */
-+#endif /* USE_HW_SHA2 && IS_LITTLE_ENDIAN */
++#endif /* USE_HW_SHA2 && !__ARM_BIG_ENDIAN */



Home | Main Index | Thread Index | Old Index