[SCM] drumgizmo/master: Change mips-atomic.patch to always link libatomic

viccuad-guest at users.alioth.debian.org viccuad-guest at users.alioth.debian.org
Tue Nov 8 23:05:49 UTC 2016


The following commit has been merged in the master branch:
commit dcdf41cb8929558fc8f46f2e46582cd5e924b912
Author: Víctor Cuadrado Juan <me at viccuad.me>
Date:   Tue Nov 8 23:40:51 2016 +0100

    Change mips-atomic.patch to always link libatomic
    
    The previous patch worked correctly for the wrong reasons;
    It should probably have a separate check to test if
    64-bit atomics require library calls, and the test
    may get optimized away anyway.
    
    Simplify the solution by just always linking libatomic.

diff --git a/debian/patches/mips-atomic.patch b/debian/patches/mips-atomic.patch
index b0ed5eb..8c73a90 100644
--- a/debian/patches/mips-atomic.patch
+++ b/debian/patches/mips-atomic.patch
@@ -1,24 +1,41 @@
-Description: Ensure libatomic test checks for large integers
- On 32-bit MIPS (and possibly other) systems, 64-bit atomics are not available
- but 32-bit atomics are. This defeats the test in configure.ac which only checks
- if 'int' can be used with atomics. The patch adjusts the test so that libatomic
- is used if any integer cannot support atomics without it.
-Author: Radovan Birdic <Radovan.Birdic at imgtec.com>
+Description: Remove libatomic test check and always link against it
+ On 32-bit MIPS (and possibly other) systems, 64-bit atomics are not
+ available but 32-bit atomics are. This defeats the test in configure.ac
+ which only checks if 'int' can be used with atomics.
+ Take out the libatomic check from configure.ac and just link against
+ libatomic always.
+Author: Víctor Cuadrado <me at viccuad.me>
 Bug-Debian: https://bugs.debian.org/843136
-Reviewed-by: James Cowgill <jcowgill at debian.org>
+Date: Tue, 8 Nov 2016 23:04:31 +0100
 ---
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+ configure.ac | 17 +----------------
+ 1 file changed, 1 insertion(+), 16 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 1bb840d..54ed45b 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -473,9 +473,10 @@ dnl ======================
- AC_MSG_CHECKING([for the need for linkage with libatomic])
- AC_LANG_PUSH([C++])
- AC_LINK_IFELSE([AC_LANG_SOURCE[
-+      #include <cstdint>
-       #include <atomic>
-       int main() {
+@@ -470,22 +470,7 @@ AC_HAVE_LIBRARY([rt],[],[])
+ dnl ======================
+ dnl Check for the atomic library
+ dnl ======================
+-AC_MSG_CHECKING([for the need for linkage with libatomic])
+-AC_LANG_PUSH([C++])
+-AC_LINK_IFELSE([AC_LANG_SOURCE[
+-      #include <atomic>
+-      int main() {
 -        struct Test { int val; };
-+        struct Test { std::uintmax_t val; };
-         std::atomic<Test> s;
-         return s.is_lock_free()?1:0;
-       }
+-        std::atomic<Test> s;
+-        return s.is_lock_free()?1:0;
+-      }
+-    ]],
+-    [AC_MSG_RESULT([no])],
+-    [AC_MSG_RESULT([yes])
+-	   AC_HAVE_LIBRARY([atomic],[],[])
+-    ]
+-)
+-AC_LANG_POP([C++])
++AC_HAVE_LIBRARY([atomic],[],[])
+ 
+ dnl ======================
+ dnl Check for the pthread library

-- 
drumgizmo packaging



More information about the pkg-multimedia-commits mailing list