drm: Branch 'master' - 2 commits

[email protected] (Emil Velikov)
Newsgroups gmane.comp.video.dri.patches
Message-ID <[email protected]>
 configure.ac |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 8913cd95b2f815687f356574fde35179d292cbd1
Author: Emil Velikov <[email protected]>
Date:   Mon Nov 16 13:51:01 2015 +0000

    configure.ac: test for the same atomic function as the one we use
    
    Unlikely that we'll hit a case where __sync_fetch_and_add is present
    while __sync_add_and_fetch isn't. Regardless let's keep things sane and
    consistent.
    
    Signed-off-by: Emil Velikov <[email protected]>

diff --git a/configure.ac b/configure.ac
index 89a3a46..b929d36 100644
--- a/configure.ac
+++ b/configure.ac
@@ -210,7 +210,7 @@ AC_CACHE_CHECK([for native atomic primitives], drm_cv_atomic_primitives, [
 	drm_cv_atomic_primitives="none"
 
 	AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-	int atomic_add(int *i) { return __sync_fetch_and_add (i, 1); }
+	int atomic_add(int *i) { return __sync_add_and_fetch (i, 1); }
 	int atomic_cmpxchg(int *i, int j, int k) { return __sync_val_compare_and_swap (i, j, k); }
 					  ]],[[]])], [drm_cv_atomic_primitives="Intel"],[])
 
commit f4b83bff60838f677e8c3c448bcd969810346e35
Author: Jonathan Gray <[email protected]>
Date:   Sat Aug 29 17:32:50 2015 +1000

    configure.ac: rework compiler builtin atomic tests
    
    The libdrm autoconf test for atomics uses __sync_val_compare_and_swap with
    the address of a function argument which triggers a gcc ICE on sparc64
    with the OpenBSD system compiler.
    
    Mark Kettenis pointed out that while other architectures probably spill the
    argument onto the stack this is likely not the case on register window
    architectures like SPARC and suggested passing a pointer as an argument
    instead which avoids the ICE and allows the drm libraries requiring
    atomics to build on sparc64 with the autoconf build.
    
    Reported-by: Christian Weisgerber <[email protected]>
    Signed-off-by: Jonathan Gray <[email protected]>
    Reviewed-by: Mark Kettenis <[email protected]>
    Reviewed-by: Matthieu Herrb <[email protected]>

diff --git a/configure.ac b/configure.ac
index cf10ef2..89a3a46 100644
--- a/configure.ac
+++ b/configure.ac
@@ -210,8 +210,8 @@ AC_CACHE_CHECK([for native atomic primitives], drm_cv_atomic_primitives, [
 	drm_cv_atomic_primitives="none"
 
 	AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-	int atomic_add(int i) { return __sync_fetch_and_add (&i, 1); }
-	int atomic_cmpxchg(int i, int j, int k) { return __sync_val_compare_and_swap (&i, j, k); }
+	int atomic_add(int *i) { return __sync_fetch_and_add (i, 1); }
+	int atomic_cmpxchg(int *i, int j, int k) { return __sync_val_compare_and_swap (i, j, k); }
 					  ]],[[]])], [drm_cv_atomic_primitives="Intel"],[])
 
 	if test "x$drm_cv_atomic_primitives" = "xnone"; then

------------------------------------------------------------------------------
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a 
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140
--
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.