diff options
author | rin <rin@pkgsrc.org> | 2020-02-20 06:25:28 +0000 |
---|---|---|
committer | rin <rin@pkgsrc.org> | 2020-02-20 06:25:28 +0000 |
commit | 38d22c77604b19ee346e2da5693db82db89e14e2 (patch) | |
tree | 35f11593e7ce168aa30b4f370572a4f00e0911e7 /devel/apr | |
parent | 4cbb82e37ec53aacc00ad9ac655ba16c819ac624 (diff) | |
download | pkgsrc-38d22c77604b19ee346e2da5693db82db89e14e2.tar.gz |
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.
Diffstat (limited to 'devel/apr')
-rw-r--r-- | devel/apr/Makefile | 3 | ||||
-rw-r--r-- | devel/apr/distinfo | 5 | ||||
-rw-r--r-- | devel/apr/patches/patch-atomic_unix_builtins.c | 18 | ||||
-rw-r--r-- | devel/apr/patches/patch-atomic_unix_builtins64.c | 21 | ||||
-rw-r--r-- | devel/apr/patches/patch-include_arch_unix_apr__arch__atomic.h | 16 |
5 files changed, 61 insertions, 2 deletions
diff --git a/devel/apr/Makefile b/devel/apr/Makefile index 8d7782b9580..17c8d852229 100644 --- a/devel/apr/Makefile +++ b/devel/apr/Makefile @@ -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 diff --git a/devel/apr/distinfo b/devel/apr/distinfo index e7d5a8b29c8..fb1ceac33f3 100644 --- a/devel/apr/distinfo +++ b/devel/apr/distinfo @@ -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 diff --git a/devel/apr/patches/patch-atomic_unix_builtins.c b/devel/apr/patches/patch-atomic_unix_builtins.c new file mode 100644 index 00000000000..891a218645f --- /dev/null +++ b/devel/apr/patches/patch-atomic_unix_builtins.c @@ -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) diff --git a/devel/apr/patches/patch-atomic_unix_builtins64.c b/devel/apr/patches/patch-atomic_unix_builtins64.c new file mode 100644 index 00000000000..5856c28ebbd --- /dev/null +++ b/devel/apr/patches/patch-atomic_unix_builtins64.c @@ -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 */ diff --git a/devel/apr/patches/patch-include_arch_unix_apr__arch__atomic.h b/devel/apr/patches/patch-include_arch_unix_apr__arch__atomic.h new file mode 100644 index 00000000000..0aa89b2bb1b --- /dev/null +++ b/devel/apr/patches/patch-include_arch_unix_apr__arch__atomic.h @@ -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 |