pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/apr



Module Name:    pkgsrc
Committed By:   rin
Date:           Thu Feb 20 06:25:28 UTC 2020

Modified Files:
        pkgsrc/devel/apr: Makefile distinfo
Added Files:
        pkgsrc/devel/apr/patches: patch-atomic_unix_builtins.c
            patch-atomic_unix_builtins64.c
            patch-include_arch_unix_apr__arch__atomic.h

Log Message:
Work around missing 64bit atomic compiler builtins on IPL32 platforms
other than x86, that is handled manually (mess!).

It should be better to fix autoconf stuff rather than source codes.
However, (1) it requires to regen configure script, and (2) apr 2.0
uses cmake.

Thanks to @est_suzume for analysis.


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 pkgsrc/devel/apr/Makefile
cvs rdiff -u -r1.45 -r1.46 pkgsrc/devel/apr/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/apr/patches/patch-atomic_unix_builtins.c \
    pkgsrc/devel/apr/patches/patch-atomic_unix_builtins64.c \
    pkgsrc/devel/apr/patches/patch-include_arch_unix_apr__arch__atomic.h

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

Modified files:

Index: pkgsrc/devel/apr/Makefile
diff -u pkgsrc/devel/apr/Makefile:1.81 pkgsrc/devel/apr/Makefile:1.82
--- pkgsrc/devel/apr/Makefile:1.81      Sat Jan 18 23:30:22 2020
+++ pkgsrc/devel/apr/Makefile   Thu Feb 20 06:25:28 2020
@@ -1,9 +1,10 @@
-# $NetBSD: Makefile,v 1.81 2020/01/18 23:30:22 rillig Exp $
+# $NetBSD: Makefile,v 1.82 2020/02/20 06:25:28 rin Exp $
 #
 # Take care, changelogs often include "PR 12345" strings
 # which cause GNATS indigestion.
 
 DISTNAME=      apr-1.7.0
+PKGREVISION=   1
 CATEGORIES=    devel
 MASTER_SITES=  ${MASTER_SITE_APACHE:=apr/}
 EXTRACT_SUFX=  .tar.bz2

Index: pkgsrc/devel/apr/distinfo
diff -u pkgsrc/devel/apr/distinfo:1.45 pkgsrc/devel/apr/distinfo:1.46
--- pkgsrc/devel/apr/distinfo:1.45      Fri Apr 12 13:02:44 2019
+++ pkgsrc/devel/apr/distinfo   Thu Feb 20 06:25:28 2020
@@ -1,7 +1,10 @@
-$NetBSD: distinfo,v 1.45 2019/04/12 13:02:44 wiz Exp $
+$NetBSD: distinfo,v 1.46 2020/02/20 06:25:28 rin Exp $
 
 SHA1 (apr-1.7.0.tar.bz2) = 58ebc7b35efaebb211c0b9df594ab16c4d874234
 RMD160 (apr-1.7.0.tar.bz2) = 4b282845f4ba1c4949b7b386c438e5ef98deaf4b
 SHA512 (apr-1.7.0.tar.bz2) = 3dc42d5caf17aab16f5c154080f020d5aed761e22db4c5f6506917f6bfd2bf8becfb40af919042bd4ce1077d5de74aa666f5edfba7f275efba78e8893c115148
 Size (apr-1.7.0.tar.bz2) = 872238 bytes
+SHA1 (patch-atomic_unix_builtins.c) = e90d0232013650c3d227fa3a8be952c51b7148e8
+SHA1 (patch-atomic_unix_builtins64.c) = e24316e93dae12efc1cbfc3f444e8622df5e5833
 SHA1 (patch-include_apr__general.h) = bff357eee11218a6c53769278fc3f9094b062fdf
+SHA1 (patch-include_arch_unix_apr__arch__atomic.h) = 6f226add54f5966a50985441f6903853a0728c88

Added files:

Index: pkgsrc/devel/apr/patches/patch-atomic_unix_builtins.c
diff -u /dev/null pkgsrc/devel/apr/patches/patch-atomic_unix_builtins.c:1.1
--- /dev/null   Thu Feb 20 06:25:28 2020
+++ pkgsrc/devel/apr/patches/patch-atomic_unix_builtins.c       Thu Feb 20 06:25:28 2020
@@ -0,0 +1,18 @@
+$NetBSD: patch-atomic_unix_builtins.c,v 1.1 2020/02/20 06:25:28 rin Exp $
+
+Work around missing 64bit atomic builtins for non-x86 ILP32 platforms.
+
+--- atomic/unix/builtins.c.orig        2020-02-19 16:07:42.205846916 +0900
++++ atomic/unix/builtins.c     2020-02-19 16:08:29.237974955 +0900
+@@ -20,7 +20,11 @@
+ 
+ APR_DECLARE(apr_status_t) apr_atomic_init(apr_pool_t *p)
+ {
++#ifdef NEED_ATOMICS_GENERIC64
++    return apr__atomic_generic64_init(p);
++#else
+     return APR_SUCCESS;
++#endif
+ }
+ 
+ APR_DECLARE(apr_uint32_t) apr_atomic_read32(volatile apr_uint32_t *mem)
Index: pkgsrc/devel/apr/patches/patch-atomic_unix_builtins64.c
diff -u /dev/null pkgsrc/devel/apr/patches/patch-atomic_unix_builtins64.c:1.1
--- /dev/null   Thu Feb 20 06:25:28 2020
+++ pkgsrc/devel/apr/patches/patch-atomic_unix_builtins64.c     Thu Feb 20 06:25:28 2020
@@ -0,0 +1,21 @@
+$NetBSD: patch-atomic_unix_builtins64.c,v 1.1 2020/02/20 06:25:28 rin Exp $
+
+Work around missing 64bit atomic builtins for non-x86 ILP32 platforms.
+
+--- atomic/unix/builtins64.c.orig      2020-02-19 16:06:32.153732769 +0900
++++ atomic/unix/builtins64.c   2020-02-19 16:08:48.239198201 +0900
+@@ -16,7 +16,7 @@
+ 
+ #include "apr_arch_atomic.h"
+ 
+-#ifdef USE_ATOMICS_BUILTINS
++#if defined (USE_ATOMICS_BUILTINS) && !defined (NEED_ATOMICS_GENERIC64)
+ 
+ APR_DECLARE(apr_uint64_t) apr_atomic_read64(volatile apr_uint64_t *mem)
+ {
+@@ -61,4 +61,4 @@ APR_DECLARE(apr_uint64_t) apr_atomic_xch
+     return __sync_lock_test_and_set(mem, val);
+ }
+ 
+-#endif /* USE_ATOMICS_BUILTINS */
++#endif /* USE_ATOMICS_BUILTINS && !NEED_ATOMICS_GENERIC64 */
Index: pkgsrc/devel/apr/patches/patch-include_arch_unix_apr__arch__atomic.h
diff -u /dev/null pkgsrc/devel/apr/patches/patch-include_arch_unix_apr__arch__atomic.h:1.1
--- /dev/null   Thu Feb 20 06:25:28 2020
+++ pkgsrc/devel/apr/patches/patch-include_arch_unix_apr__arch__atomic.h        Thu Feb 20 06:25:28 2020
@@ -0,0 +1,16 @@
+$NetBSD: patch-include_arch_unix_apr__arch__atomic.h,v 1.1 2020/02/20 06:25:28 rin Exp $
+
+Work around missing 64bit atomic builtins for non-x86 ILP32 platforms.
+
+--- include/arch/unix/apr_arch_atomic.h.orig   2020-02-19 15:50:52.065380193 +0900
++++ include/arch/unix/apr_arch_atomic.h        2020-02-19 15:51:59.253483287 +0900
+@@ -26,6 +26,9 @@
+ /* noop */
+ #elif HAVE_ATOMIC_BUILTINS
+ #   define USE_ATOMICS_BUILTINS
++#   ifndef __LP64__
++#     define NEED_ATOMICS_GENERIC64
++#   endif
+ #elif defined(SOLARIS2) && SOLARIS2 >= 10
+ #   define USE_ATOMICS_SOLARIS
+ #   define NEED_ATOMICS_GENERIC64



Home | Main Index | Thread Index | Old Index