summaryrefslogtreecommitdiff
path: root/lib/libdrm
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2015-08-28 14:25:04 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2015-08-28 14:25:04 +0000
commit60b89af1ae1e9627b8a460d30d8b1626da33146e (patch)
tree67760f23fe61c3df578ff5411b3ddb5ecf07ab24 /lib/libdrm
parent958f778a7eb305c0e397606825a769cd02ab527a (diff)
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 resulting in libdrm_radeon not being built as reported by naddy. 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 again. ok kettenis@ matthieu@
Diffstat (limited to 'lib/libdrm')
-rw-r--r--lib/libdrm/configure.ac4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libdrm/configure.ac b/lib/libdrm/configure.ac
index f07507b51..705ac3e70 100644
--- a/lib/libdrm/configure.ac
+++ b/lib/libdrm/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