[tbb] 61/64: Imported Debian patch 4.3~20150611-1~exp2
Graham Inggs
ginggs at moszumanska.debian.org
Mon Jul 3 12:28:10 UTC 2017
This is an automated email from the git hooks/post-receive script.
ginggs pushed a commit to branch master
in repository tbb.
commit ed87bb7208c69648e3b9c7d58cbd8aa540ada810
Author: Steve Capper <steven.capper at gmail.com>
Date: Thu Jul 2 19:32:04 2015 +0100
Imported Debian patch 4.3~20150611-1~exp2
---
debian/changelog | 8 ++++++++
debian/patches/atomic-rework.patch | 21 +++++++++++++++++++++
debian/patches/ppc32_atomics.patch | 28 ----------------------------
debian/patches/series | 2 +-
4 files changed, 30 insertions(+), 29 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 636638b..63d26f3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+tbb (4.3~20150611-1~exp2) experimental; urgency=medium
+
+ * Replace __sync_val_compare_and_swap with __atomic_compare_exchange_n for
+ gcc_generic.h
+ - Original patch by Mathieu Malaterre, some logic has been tweaked.
+
+ -- Steve Capper <steven.capper at gmail.com> Thu, 02 Jul 2015 19:32:04 +0100
+
tbb (4.3~20150611-1~exp1) experimental; urgency=medium
* New upstream release.
diff --git a/debian/patches/atomic-rework.patch b/debian/patches/atomic-rework.patch
new file mode 100644
index 0000000..539fdb2
--- /dev/null
+++ b/debian/patches/atomic-rework.patch
@@ -0,0 +1,21 @@
+Description: Use gcc __atomic instead of __sync for compswp
+Author: Original author Mathieu Malaterre <malat at debian.org>
+ Promoted to gcc_generic.h and hacked with by Steve Capper <steven.capper at gmail.com>
+
+Index: tbb-4.3~20150611/include/tbb/machine/gcc_generic.h
+===================================================================
+--- tbb-4.3~20150611.orig/include/tbb/machine/gcc_generic.h
++++ tbb-4.3~20150611/include/tbb/machine/gcc_generic.h
+@@ -62,7 +62,11 @@
+
+ #define __TBB_MACHINE_DEFINE_ATOMICS(S,T) \
+ inline T __TBB_machine_cmpswp##S( volatile void *ptr, T value, T comparand ) { \
+- return __sync_val_compare_and_swap(reinterpret_cast<volatile T *>(ptr),comparand,value); \
++ T retval = comparand; \
++ if (__atomic_compare_exchange_n(reinterpret_cast<volatile T *>(ptr), &retval, value, \
++ false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)) \
++ return retval; \
++ return retval; \
+ } \
+ \
+ inline T __TBB_machine_fetchadd##S( volatile void *ptr, T value ) { \
diff --git a/debian/patches/ppc32_atomics.patch b/debian/patches/ppc32_atomics.patch
deleted file mode 100644
index 41e5aab..0000000
--- a/debian/patches/ppc32_atomics.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Description: Make the test suite compile on ppc32
- where atomics implementation are missing
- The code simply check ppc32 vs ppc64, the macros are defined on gcc 4.9.1
-Author: Mathieu Malaterre <malat at debian.org>
-Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63368
-Bug-Debian: http://bugs.debian.org/762656
-
-Index: tbb-4.3~20150611/include/tbb/tbb_config.h
-===================================================================
---- tbb-4.3~20150611.orig/include/tbb/tbb_config.h
-+++ tbb-4.3~20150611/include/tbb/tbb_config.h
-@@ -268,7 +268,16 @@
- /* TODO: change the version back to 4.1.2 once macro __TBB_WORD_SIZE become optional */
- #if __TBB_GCC_VERSION >= 40306 || __INTEL_COMPILER >= 1200
- /** built-in atomics available in GCC since 4.1.2 **/
-+#if __PPC__
-+#if __PPC64__
- #define __TBB_GCC_BUILTIN_ATOMICS_PRESENT 1
-+#else
-+ // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63368
-+ #define __TBB_GCC_BUILTIN_ATOMICS_PRESENT 0
-+#endif
-+#else
-+ #define __TBB_GCC_BUILTIN_ATOMICS_PRESENT 1
-+#endif
- #endif
-
- #if __INTEL_COMPILER >= 1200
diff --git a/debian/patches/series b/debian/patches/series
index d482aa1..07acd07 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,4 +4,4 @@ failonbadtests.patch
buildi386.patch
linuxreleasedetect.patch
tally-unit-test-fails.patch
-ppc32_atomics.patch
+atomic-rework.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/tbb.git
More information about the debian-science-commits
mailing list