pkgsrc-Changes archive

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

CVS commit: pkgsrc/databases/db4



Module Name:    pkgsrc
Committed By:   hauke
Date:           Sun Jan 18 20:59:43 UTC 2026

Modified Files:
        pkgsrc/databases/db4: distinfo
        pkgsrc/databases/db4/patches: patch-ae

Log Message:
Restore the mutex support patches for aarm64 and mips.

What likely happened:

After a 'make patch', I manually applied the sparc mutex support patch
on top. patch(1) overwrote the existing mutex_int.h.orig, and
mkpatches(1) then updated the patch as diff between the new .orig and
the file, which only had the sparc support.

Instead, I should have preserved the .orig file from 'make patch', and
restored it after the manual patch. YLYL.

SHould fix PR pkg/59925.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 pkgsrc/databases/db4/distinfo
cvs rdiff -u -r1.3 -r1.4 pkgsrc/databases/db4/patches/patch-ae

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/databases/db4/distinfo
diff -u pkgsrc/databases/db4/distinfo:1.52 pkgsrc/databases/db4/distinfo:1.53
--- pkgsrc/databases/db4/distinfo:1.52  Tue Dec 16 10:19:11 2025
+++ pkgsrc/databases/db4/distinfo       Sun Jan 18 20:59:43 2026
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.52 2025/12/16 10:19:11 hauke Exp $
+$NetBSD: distinfo,v 1.53 2026/01/18 20:59:43 hauke Exp $
 
 BLAKE2s (db-4.8.30.tar.gz) = 0f2f1b2e53dbabd4c34a4df9dbf91f9051a24375bbbfb75c56372bb3af1ca979
 SHA512 (db-4.8.30.tar.gz) = d1a3c52b0ab54ae3fd6792e6396c9f74d25f36b2eb9e853b67ef9c872508a58c784c7818108d06d184f59601b70cc877916e67dfea6f0ee1ca2b07468c1041f1
@@ -6,7 +6,7 @@ Size (db-4.8.30.tar.gz) = 22887305 bytes
 SHA1 (patch-aa) = 1004feec022eefbf3fd57b6d9af99edc5a2bf17a
 SHA1 (patch-ab) = 6a33d43efbfe34e93954e543fe8c8a72e522b4b4
 SHA1 (patch-ac) = 045a3b83b9c6c164382ec546b06ae248620552cf
-SHA1 (patch-ae) = c71cd08bc2719491cf1b8cec11aa5534e61dd4f4
+SHA1 (patch-ae) = 6aae50716bdc4f5d7fba79d24a35dacfc3398130
 SHA1 (patch-af) = d9706895e538468f3b442fde3e8d6c9caceaaf4f
 SHA1 (patch-db__sql_sqlite_sqliteInt.h) = 7e5579d6c55c8163e35718bdecbce079b1efde3e
 SHA1 (patch-dbinc_atomic.h) = 3397a98c00655a44b7ad09fea78053785b1a42d8

Index: pkgsrc/databases/db4/patches/patch-ae
diff -u pkgsrc/databases/db4/patches/patch-ae:1.3 pkgsrc/databases/db4/patches/patch-ae:1.4
--- pkgsrc/databases/db4/patches/patch-ae:1.3   Tue Dec 16 10:19:11 2025
+++ pkgsrc/databases/db4/patches/patch-ae       Sun Jan 18 20:59:43 2026
@@ -1,12 +1,59 @@
-$NetBSD: patch-ae,v 1.3 2025/12/16 10:19:11 hauke Exp $
+$NetBSD: patch-ae,v 1.4 2026/01/18 20:59:43 hauke Exp $
 
-* adds support for mutexes on aarch64
-* fixes build failure on MIPS arch with -mips1.
-* adds mutex support for sparc v[789]
+(1) adds support for mutexes on aarch64
 
---- dbinc/mutex_int.h.orig     2025-12-15 13:35:56.838500475 +0000
+(2) adds mutex support for sparc v[789]
+
+(3) fixes build failure on MIPS arch with -mips1.
+
+
+--- dbinc/mutex_int.h.orig     2010-04-12 20:25:22.000000000 +0000
 +++ dbinc/mutex_int.h
-@@ -751,14 +751,24 @@ typedef unsigned char tsl_t;
+@@ -491,6 +491,43 @@ typedef unsigned char tsl_t;
+ #endif
+ 
+ /*********************************************************************
++ * AARCH64/gcc assembly.
++ *********************************************************************/
++
++#ifdef HAVE_MUTEX_AARCH64_GCC_ASSEMBLY
++typedef unsigned int tsl_t;
++
++#ifdef LOAD_ACTUAL_MUTEX_CODE
++static inline int
++MUTEX_SET(tsl_t *tsl) {
++      register tsl_t *__l = tsl;
++      register tsl_t __r;
++      __asm__ volatile(
++              "1:     ldxr    %w0,[%1]\n"
++              "       cbnz    %w0,2f\n"
++              "       stxr    %w0,%w2,[%1]\n"
++              "       cbnz    %w0,1b\n"
++              "       dmb     st\n"
++              "2:"
++              : "=&r"(__r)
++              : "r"(__l), "r"(1)
++              : "memory");
++
++      return !__r;
++}
++
++static inline int
++MUTEX_UNSET(tsl_t *tsl) {
++      __asm__ volatile(
++              "       dsb     sy\n" ::: "memory");
++      return *tsl = 0;
++}
++
++#define       MUTEX_INIT(tsl)         (MUTEX_UNSET(tsl), 0)
++#endif
++#endif
++
++/*********************************************************************
+  * HPPA/gcc assembly.
+  *********************************************************************/
+ #ifdef HAVE_MUTEX_HPPA_GCC_ASSEMBLY
+@@ -714,14 +751,24 @@ typedef unsigned char tsl_t;
        !__r;                                                           \
  })
  
@@ -32,3 +79,18 @@ $NetBSD: patch-ae,v 1.3 2025/12/16 10:19
  #endif
  #endif
  
+@@ -778,10 +825,14 @@ MUTEX_SET(tsl_t *tsl) {
+ static inline void
+ MUTEX_UNSET(tsl_t *tsl) {
+       __asm__ volatile(
++             "       .set push           \n"
++             "       .set mips2          \n"
+              "       .set noreorder      \n"
++             "       .set nomacro        \n"
+              "       sync                \n"
+              "       sw      $0, %0      \n"
+              "       .set reorder        \n"
++             "       .set pop            \n"
+              : "=m" (*tsl)
+              : "m" (*tsl)
+              : "memory");



Home | Main Index | Thread Index | Old Index