[med-svn] r16998 - in trunk/packages/idba/trunk/debian: . patches
Andreas Tille
tille at moszumanska.debian.org
Thu May 22 12:03:42 UTC 2014
Author: tille
Date: 2014-05-22 12:03:42 +0000 (Thu, 22 May 2014)
New Revision: 16998
Added:
trunk/packages/idba/trunk/debian/patches/
trunk/packages/idba/trunk/debian/patches/series
trunk/packages/idba/trunk/debian/patches/use-atomic-for-mips.patch
Modified:
trunk/packages/idba/trunk/debian/changelog
trunk/packages/idba/trunk/debian/rules
Log:
Fix build issue on MIPS
Modified: trunk/packages/idba/trunk/debian/changelog
===================================================================
--- trunk/packages/idba/trunk/debian/changelog 2014-05-22 11:07:14 UTC (rev 16997)
+++ trunk/packages/idba/trunk/debian/changelog 2014-05-22 12:03:42 UTC (rev 16998)
@@ -1,3 +1,11 @@
+idba (1.1.1-2) unstable; urgency=medium
+
+ * Fix build issue on MIPS (and hopefully sparc and powerpc) Thanks for
+ the patch to Dejan Latinovic <Dejan.Latinovic at imgtec.com>)
+ Closes: #748932
+
+ -- Andreas Tille <tille at debian.org> Thu, 22 May 2014 13:49:34 +0200
+
idba (1.1.1-1) unstable; urgency=low
* Initial release (Closes: #738860)
Added: trunk/packages/idba/trunk/debian/patches/series
===================================================================
--- trunk/packages/idba/trunk/debian/patches/series (rev 0)
+++ trunk/packages/idba/trunk/debian/patches/series 2014-05-22 12:03:42 UTC (rev 16998)
@@ -0,0 +1 @@
+use-atomic-for-mips.patch
Added: trunk/packages/idba/trunk/debian/patches/use-atomic-for-mips.patch
===================================================================
--- trunk/packages/idba/trunk/debian/patches/use-atomic-for-mips.patch (rev 0)
+++ trunk/packages/idba/trunk/debian/patches/use-atomic-for-mips.patch 2014-05-22 12:03:42 UTC (rev 16998)
@@ -0,0 +1,56 @@
+Author: Dejan Latinovic <Dejan.Latinovic at imgtec.com>
+Last-Update: Thu, 22 May 2014 11:24:49 +0000
+Bugs-Debian: http://bugs.debian.org/748932
+Description: Fix for mips (and *hopefully* also sparc and powerpc
+ Mips platform does not have 64-bit __sync_* operations.
+ To avoid this behaviuor it is needed to use
+ corresponding __atomic_* from libatomic library.
+
+--- a/bin/Makefile.in
++++ b/bin/Makefile.in
+@@ -283,7 +283,7 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
+ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+ LDFLAGS = @LDFLAGS@
+ LIBOBJS = @LIBOBJS@
+-LIBS = $(top_srcdir)/lib/libassembly.a
++LIBS = $(top_srcdir)/lib/libassembly.a @LIBS@
+ LTLIBOBJS = @LTLIBOBJS@
+ MAKEINFO = @MAKEINFO@
+ MKDIR_P = @MKDIR_P@
+--- a/src/basic/atomic_integer.h
++++ b/src/basic/atomic_integer.h
+@@ -35,6 +35,25 @@ public:
+ bool operator ==(const AtomicInteger<T> &x) const { return value_ == x.value_; }
+ bool operator !=(const AtomicInteger<T> &x) const { return value_ != x.value_; }
+
++
++# if defined(__mips__) && !defined(__mips64)
++
++ T operator += (T x) { return __atomic_add_fetch(&value_, x,__ATOMIC_SEQ_CST); }
++ T operator -= (T x) { return __atomic_sub_fetch(&value_, x, __ATOMIC_SEQ_CST); }
++ T operator |= (T x) { return __atomic_or_fetch(&value_, x, __ATOMIC_SEQ_CST); }
++ T operator &= (T x) { return __atomic_and_fetch(&value_, x, __ATOMIC_SEQ_CST); }
++ T operator ^= (T x) { return __atomic_xor_fetch(&value_, x, __ATOMIC_SEQ_CST); }
++
++ T operator ++() { return __atomic_add_fetch(&value_, 1, __ATOMIC_SEQ_CST); }
++ T operator ++(int) { return __atomic_fetch_add(&value_, 1, __ATOMIC_SEQ_CST); }
++ T operator --() { return __atomic_sub_fetch(&value_, 1, __ATOMIC_SEQ_CST); }
++ T operator --(int) { return __atomic_fetch_sub(&value_, 1, __ATOMIC_SEQ_CST); }
++
++ bool CompareAndSet(T old_value, T new_value)
++ { return __atomic_compare_exchange(&value_, &old_value, &new_value, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); }
++
++# else
++
+ T operator += (T x) { return __sync_add_and_fetch(&value_, x); }
+ T operator -= (T x) { return __sync_sub_and_fetch(&value_, x); }
+ T operator |= (T x) { return __sync_or_and_fetch(&value_, x); }
+@@ -49,6 +68,8 @@ public:
+ bool CompareAndSet(T old_value, T new_value)
+ { return __sync_bool_compare_and_swap(&value_, old_value, new_value); }
+
++# endif
++
+ void swap(AtomicInteger &x)
+ { if (this != &x) std::swap(value_, x.value_); }
+
Modified: trunk/packages/idba/trunk/debian/rules
===================================================================
--- trunk/packages/idba/trunk/debian/rules 2014-05-22 11:07:14 UTC (rev 16997)
+++ trunk/packages/idba/trunk/debian/rules 2014-05-22 12:03:42 UTC (rev 16998)
@@ -7,6 +7,9 @@
%:
dh $@
+override_dh_auto_configure:
+ dh_auto_configure -- LDFLAGS="$(LDFLAGS) -Wl,--as-needed" LIBS="$(LIBS) -latomic"
+
override_dh_install:
dh_install
# for the moment the role of these scripts is totally unknown but they do not seem to be necessary
More information about the debian-med-commit
mailing list