pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/userspace-rcu Fix build with Clang on ARM.
details: https://anonhg.NetBSD.org/pkgsrc/rev/60b2a1cfb939
branches: trunk
changeset: 648799:60b2a1cfb939
user: joerg <joerg%pkgsrc.org@localhost>
date: Thu Mar 19 19:14:26 2015 +0000
description:
Fix build with Clang on ARM.
diffstat:
devel/userspace-rcu/distinfo | 3 +-
devel/userspace-rcu/patches/patch-urcu_uatomic_generic.h | 100 +++++++++++++++
2 files changed, 102 insertions(+), 1 deletions(-)
diffs (115 lines):
diff -r ab8009549d3a -r 60b2a1cfb939 devel/userspace-rcu/distinfo
--- a/devel/userspace-rcu/distinfo Thu Mar 19 18:33:43 2015 +0000
+++ b/devel/userspace-rcu/distinfo Thu Mar 19 19:14:26 2015 +0000
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.8 2014/11/10 20:59:39 pettai Exp $
+$NetBSD: distinfo,v 1.9 2015/03/19 19:14:26 joerg Exp $
SHA1 (userspace-rcu-0.8.6.tar.bz2) = f10e9bf812557cd0c2a35a277e04010ec278d25d
RMD160 (userspace-rcu-0.8.6.tar.bz2) = 4d40678ed27a78768cea1947e54a2b510b52fa33
Size (userspace-rcu-0.8.6.tar.bz2) = 424037 bytes
+SHA1 (patch-urcu_uatomic_generic.h) = 6492e58d704805b29e9dce119c76ebdf615adddc
diff -r ab8009549d3a -r 60b2a1cfb939 devel/userspace-rcu/patches/patch-urcu_uatomic_generic.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/userspace-rcu/patches/patch-urcu_uatomic_generic.h Thu Mar 19 19:14:26 2015 +0000
@@ -0,0 +1,100 @@
+$NetBSD: patch-urcu_uatomic_generic.h,v 1.1 2015/03/19 19:14:26 joerg Exp $
+
+Clang requires correctly sized pointer arguments for the builtins.
+
+--- urcu/uatomic/generic.h.orig 2015-03-17 21:09:40.000000000 +0000
++++ urcu/uatomic/generic.h
+@@ -65,17 +65,17 @@ unsigned long _uatomic_cmpxchg(void *add
+ switch (len) {
+ #ifdef UATOMIC_HAS_ATOMIC_BYTE
+ case 1:
+- return __sync_val_compare_and_swap_1(addr, old, _new);
++ return __sync_val_compare_and_swap_1((uint8_t *)addr, old, _new);
+ #endif
+ #ifdef UATOMIC_HAS_ATOMIC_SHORT
+ case 2:
+- return __sync_val_compare_and_swap_2(addr, old, _new);
++ return __sync_val_compare_and_swap_2((uint16_t *)addr, old, _new);
+ #endif
+ case 4:
+- return __sync_val_compare_and_swap_4(addr, old, _new);
++ return __sync_val_compare_and_swap_4((uint32_t *)addr, old, _new);
+ #if (CAA_BITS_PER_LONG == 64)
+ case 8:
+- return __sync_val_compare_and_swap_8(addr, old, _new);
++ return __sync_val_compare_and_swap_8((uint64_t *)addr, old, _new);
+ #endif
+ }
+ _uatomic_link_error();
+@@ -100,20 +100,20 @@ void _uatomic_and(void *addr, unsigned l
+ switch (len) {
+ #ifdef UATOMIC_HAS_ATOMIC_BYTE
+ case 1:
+- __sync_and_and_fetch_1(addr, val);
++ __sync_and_and_fetch_1((uint8_t *)addr, val);
+ return;
+ #endif
+ #ifdef UATOMIC_HAS_ATOMIC_SHORT
+ case 2:
+- __sync_and_and_fetch_2(addr, val);
++ __sync_and_and_fetch_2((uint16_t *)addr, val);
+ return;
+ #endif
+ case 4:
+- __sync_and_and_fetch_4(addr, val);
++ __sync_and_and_fetch_4((uint32_t *)addr, val);
+ return;
+ #if (CAA_BITS_PER_LONG == 64)
+ case 8:
+- __sync_and_and_fetch_8(addr, val);
++ __sync_and_and_fetch_8((uint64_t *)addr, val);
+ return;
+ #endif
+ }
+@@ -139,20 +139,20 @@ void _uatomic_or(void *addr, unsigned lo
+ switch (len) {
+ #ifdef UATOMIC_HAS_ATOMIC_BYTE
+ case 1:
+- __sync_or_and_fetch_1(addr, val);
++ __sync_or_and_fetch_1((uint8_t *)addr, val);
+ return;
+ #endif
+ #ifdef UATOMIC_HAS_ATOMIC_SHORT
+ case 2:
+- __sync_or_and_fetch_2(addr, val);
++ __sync_or_and_fetch_2((uint16_t *)addr, val);
+ return;
+ #endif
+ case 4:
+- __sync_or_and_fetch_4(addr, val);
++ __sync_or_and_fetch_4((uint32_t *)addr, val);
+ return;
+ #if (CAA_BITS_PER_LONG == 64)
+ case 8:
+- __sync_or_and_fetch_8(addr, val);
++ __sync_or_and_fetch_8((uint64_t *)addr, val);
+ return;
+ #endif
+ }
+@@ -180,17 +180,17 @@ unsigned long _uatomic_add_return(void *
+ switch (len) {
+ #ifdef UATOMIC_HAS_ATOMIC_BYTE
+ case 1:
+- return __sync_add_and_fetch_1(addr, val);
++ return __sync_add_and_fetch_1((uint8_t *)addr, val);
+ #endif
+ #ifdef UATOMIC_HAS_ATOMIC_SHORT
+ case 2:
+- return __sync_add_and_fetch_2(addr, val);
++ return __sync_add_and_fetch_2((uint16_t *)addr, val);
+ #endif
+ case 4:
+- return __sync_add_and_fetch_4(addr, val);
++ return __sync_add_and_fetch_4((uint32_t *)addr, val);
+ #if (CAA_BITS_PER_LONG == 64)
+ case 8:
+- return __sync_add_and_fetch_8(addr, val);
++ return __sync_add_and_fetch_8((uint64_t *)addr, val);
+ #endif
+ }
+ _uatomic_link_error();
Home |
Main Index |
Thread Index |
Old Index