[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

mesa: Changes to 'debian-unstable'



 configure.ac         |   13 +++++++++++++
 debian/changelog     |    8 ++++++++
 src/util/Makefile.am |    3 ++-
 3 files changed, 23 insertions(+), 1 deletion(-)

New commits:
commit 2411fe4a49c258b0ec8b45f52a63b3bf93d9c660
Author: Andreas Boll <andreas.boll.dev@gmail.com>
Date:   Tue Sep 26 11:26:32 2017 +0200

    Upload to unstable.

diff --git a/debian/changelog b/debian/changelog
index 96d672c..2b2e85e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,10 @@
-mesa (17.2.1-2) UNRELEASED; urgency=medium
+mesa (17.2.1-2) unstable; urgency=medium
 
   * Cherry-pick 2ef7f23820a (configure: check if -latomic is needed for
     __atomic_*) from upstream. Should fix FTBFS on armel (Closes:
     #874531).
 
- -- Andreas Boll <andreas.boll.dev@gmail.com>  Tue, 26 Sep 2017 09:43:16 +0200
+ -- Andreas Boll <andreas.boll.dev@gmail.com>  Tue, 26 Sep 2017 11:25:54 +0200
 
 mesa (17.2.1-1) unstable; urgency=medium
 

commit ee9079fc9746ca5b7bdc6d6935b35eb22629e5d3
Author: Andreas Boll <andreas.boll.dev@gmail.com>
Date:   Tue Sep 26 09:45:09 2017 +0200

    Document the cherry-pick in debian/changelog

diff --git a/debian/changelog b/debian/changelog
index 89e080e..96d672c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+mesa (17.2.1-2) UNRELEASED; urgency=medium
+
+  * Cherry-pick 2ef7f23820a (configure: check if -latomic is needed for
+    __atomic_*) from upstream. Should fix FTBFS on armel (Closes:
+    #874531).
+
+ -- Andreas Boll <andreas.boll.dev@gmail.com>  Tue, 26 Sep 2017 09:43:16 +0200
+
 mesa (17.2.1-1) unstable; urgency=medium
 
   * New upstream bugfix release. (LP: #1716250)

commit e9d731cd70dce30439c52fbf2f3a4e5dcae8fbaa
Author: Grazvydas Ignotas <notasas@gmail.com>
Date:   Mon Sep 18 22:11:26 2017 +0300

    configure: check if -latomic is needed for __atomic_*
    
    On some platforms, gcc generates library calls when __atomic_* functions
    are used, but does not link the required library (libatomic) automatically
    (supposedly to allow the app to use some other atomics implementation?).
    
    Detect this at configure time and add the library when needed. Tested
    on armel (library was added) and on x86_64 (was not, as expected).
    
    Some documentation on this is provided in GCC wiki:
    https://gcc.gnu.org/wiki/Atomic/GCCMM
    
    Fixes: 8915f0c0 "util: use GCC atomic intrinsics with explicit memory model"
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102573
    Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
    Reviewed-by: Matt Turner <mattst88@gmail.com>
    Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
    (cherry picked from commit 2ef7f23820a67e958c2252bd81eb0458903ebf33)

diff --git a/configure.ac b/configure.ac
index 6668256..49dd002 100644
--- a/configure.ac
+++ b/configure.ac
@@ -410,8 +410,21 @@ int main() {
 }]])], GCC_ATOMIC_BUILTINS_SUPPORTED=1)
 if test "x$GCC_ATOMIC_BUILTINS_SUPPORTED" = x1; then
     DEFINES="$DEFINES -DUSE_GCC_ATOMIC_BUILTINS"
+    dnl On some platforms, new-style atomics need a helper library
+    AC_MSG_CHECKING(whether -latomic is needed)
+    AC_LINK_IFELSE([AC_LANG_SOURCE([[
+    #include <stdint.h>
+    uint64_t v;
+    int main() {
+        return (int)__atomic_load_n(&v, __ATOMIC_ACQUIRE);
+    }]])], GCC_ATOMIC_BUILTINS_NEED_LIBATOMIC=no, GCC_ATOMIC_BUILTINS_NEED_LIBATOMIC=yes)
+    AC_MSG_RESULT($GCC_ATOMIC_BUILTINS_NEED_LIBATOMIC)
+    if test "x$GCC_ATOMIC_BUILTINS_NEED_LIBATOMIC" = xyes; then
+        LIBATOMIC_LIBS="-latomic"
+    fi
 fi
 AM_CONDITIONAL([GCC_ATOMIC_BUILTINS_SUPPORTED], [test x$GCC_ATOMIC_BUILTINS_SUPPORTED = x1])
+AC_SUBST([LIBATOMIC_LIBS])
 
 dnl Check if host supports 64-bit atomics
 dnl note that lack of support usually results in link (not compile) error
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index b92dbac..1edec53 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -46,7 +46,8 @@ libmesautil_la_SOURCES = \
 
 libmesautil_la_LIBADD = \
 	$(CLOCK_LIB) \
-	$(ZLIB_LIBS)
+	$(ZLIB_LIBS) \
+	$(LIBATOMIC_LIBS)
 
 roundeven_test_LDADD = -lm
 


Reply to: