about summary refs log tree commit diff
path: root/sysdeps/sparc/sparc32
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/sparc/sparc32')
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/Makefile5
-rw-r--r--sysdeps/sparc/sparc32/sparcv9/bits/atomic.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/sysdeps/sparc/sparc32/sparcv9/Makefile b/sysdeps/sparc/sparc32/sparcv9/Makefile
index 925fa4ff73..fefc742478 100644
--- a/sysdeps/sparc/sparc32/sparcv9/Makefile
+++ b/sysdeps/sparc/sparc32/sparcv9/Makefile
@@ -14,6 +14,11 @@ ASFLAGS-.og += -Wa,-Av9a
 ASFLAGS-.oS += -Wa,-Av9a
 endif
 
+# nscd uses atomic_spin_nop which in turn requires cpu_relax
+ifeq ($(subdir),nscd)
+routines += cpu_relax
+endif
+
 ifeq ($(subdir), nptl)
 libpthread-routines += cpu_relax
 endif
diff --git a/sysdeps/sparc/sparc32/sparcv9/bits/atomic.h b/sysdeps/sparc/sparc32/sparcv9/bits/atomic.h
index 2122afbb09..0ff5dcd69d 100644
--- a/sysdeps/sparc/sparc32/sparcv9/bits/atomic.h
+++ b/sysdeps/sparc/sparc32/sparcv9/bits/atomic.h
@@ -102,4 +102,4 @@ typedef uintmax_t uatomic_max_t;
   __asm __volatile ("membar #LoadStore | #StoreStore" : : : "memory")
 
 extern void __cpu_relax (void);
-#define atomic_spin_nop () __cpu_relax ()
+#define atomic_spin_nop() __cpu_relax ()