[OE-core] [PATCH] rpm: Disable __sync_add_and_fetch_8 on nios2

Marek Vasut marex at denx.de
Fri Apr 15 10:20:15 UTC 2016


The NIOS2 softcore does not implement the __sync_add_and_fetch_8,
so disable it accordingly.

Signed-off-by: Marek Vasut <marex at denx.de>
Cc: Ley Foon Tan <lftan at altera.com>
Cc: Richard Purdie <richard.purdie at linuxfoundation.org>
Cc: Ross Burton <ross.burton at intel.com>
Cc: Thomas Chou <thomas at wytron.com.tw>
Cc: Walter Goossens <waltergoossens at home.nl>
---
 ...1-Disable-__sync_add_and_fetch_8-on-nios2.patch | 30 ++++++++++++++++++++++
 meta/recipes-devtools/rpm/rpm_5.4+cvs.bb           |  1 +
 meta/recipes-devtools/rpm/rpm_5.4.16.bb            |  1 +
 3 files changed, 32 insertions(+)
 create mode 100644 meta/recipes-devtools/rpm/rpm/0001-Disable-__sync_add_and_fetch_8-on-nios2.patch

diff --git a/meta/recipes-devtools/rpm/rpm/0001-Disable-__sync_add_and_fetch_8-on-nios2.patch b/meta/recipes-devtools/rpm/rpm/0001-Disable-__sync_add_and_fetch_8-on-nios2.patch
new file mode 100644
index 0000000..e9b73b8
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/0001-Disable-__sync_add_and_fetch_8-on-nios2.patch
@@ -0,0 +1,30 @@
+From 06967a50f20095f5ca30b8214f4c98ba0f5262bf Mon Sep 17 00:00:00 2001
+From: Marek Vasut <marex at denx.de>
+Date: Sun, 3 Apr 2016 06:55:25 +0200
+Subject: [PATCH] Disable __sync_add_and_fetch_8 on nios2
+
+The NIOS2 softcore does not implement the __sync_add_and_fetch_8,
+so disable it accordingly.
+
+Signed-off-by: Marek Vasut <marex at denx.de>
+Upstream-Status: Submitted
+---
+ rpmio/bson.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/rpmio/bson.h b/rpmio/bson.h
+index 57023f1..60c7d02 100644
+--- a/rpmio/bson.h
++++ b/rpmio/bson.h
+@@ -880,7 +880,7 @@ BSON_END_DECLS
+ BSON_BEGIN_DECLS
+ 
+ /* Some architectures do not support __sync_add_and_fetch_8 */
+-#if (__mips == 32) || (defined(__PPC__) && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8))
++#if (__mips == 32) || (__nios2__) || (defined(__PPC__) && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8))
+ # define __BSON_NEED_ATOMIC_64 1
+ #endif
+ 
+-- 
+2.8.0.rc3
+
diff --git a/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb b/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb
index c6c21b8..0991f6d 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb
@@ -110,6 +110,7 @@ SRC_URI += " \
 	   file://rpm-python-tagname.patch \
 	   file://rpm-python-AddErase.patch \
 	   file://rpm-rpmpgp-popt.patch \
+	   file://0001-Disable-__sync_add_and_fetch_8-on-nios2.patch \
 "
 
 # OE specific changes
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.16.bb b/meta/recipes-devtools/rpm/rpm_5.4.16.bb
index 9e2229a..cbdca88 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.16.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.16.bb
@@ -115,6 +115,7 @@ SRC_URI += " \
 	   file://rpm-rpmpgp-popt.patch \
 	   file://rpm-fix-lua-tests-compilation-failure.patch \
 	   file://rpmqv.c-check-_gpg_passphrase-before-ask-for-input.patch \
+	   file://0001-Disable-__sync_add_and_fetch_8-on-nios2.patch \
 "
 
 # OE specific changes
-- 
2.7.0




More information about the Openembedded-core mailing list