blob: e9b73b8bfc3734ea2425aeb705b1be089a026601 [file] [log] [blame]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05001From 06967a50f20095f5ca30b8214f4c98ba0f5262bf Mon Sep 17 00:00:00 2001
2From: Marek Vasut <marex@denx.de>
3Date: Sun, 3 Apr 2016 06:55:25 +0200
4Subject: [PATCH] Disable __sync_add_and_fetch_8 on nios2
5
6The NIOS2 softcore does not implement the __sync_add_and_fetch_8,
7so disable it accordingly.
8
9Signed-off-by: Marek Vasut <marex@denx.de>
10Upstream-Status: Submitted
11---
12 rpmio/bson.h | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/rpmio/bson.h b/rpmio/bson.h
16index 57023f1..60c7d02 100644
17--- a/rpmio/bson.h
18+++ b/rpmio/bson.h
19@@ -880,7 +880,7 @@ BSON_END_DECLS
20 BSON_BEGIN_DECLS
21
22 /* Some architectures do not support __sync_add_and_fetch_8 */
23-#if (__mips == 32) || (defined(__PPC__) && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8))
24+#if (__mips == 32) || (__nios2__) || (defined(__PPC__) && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8))
25 # define __BSON_NEED_ATOMIC_64 1
26 #endif
27
28--
292.8.0.rc3
30