[git commit] uclibc: nptl: fix __lll_lock_wait_private multiple definition

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Mon Aug 18 10:05:45 UTC 2014


commit: http://git.uclibc.org/uClibc/commit/?id=2d9740a65a81fe050f99479c2a2f38b6a3198a8e
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master

Mark non-pthread __lll_lock_wait_private weak to avoid multiple
definition error in static link mode.

Signed-off-by: Tony Wu <tung7970 at gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
 .../sysdeps/unix/sysv/linux/arm/lowlevellock.c     |    3 +++
 .../nptl/sysdeps/unix/sysv/linux/lowlevellock.c    |    3 +++
 .../sysdeps/unix/sysv/linux/metag/lowlevellock.c   |    3 +++
 .../sysdeps/unix/sysv/linux/sparc/lowlevellock.c   |    3 +++
 4 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/lowlevellock.c b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/lowlevellock.c
index af864b3..cd42135 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/lowlevellock.c
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/lowlevellock.c
@@ -23,6 +23,9 @@
 #include <tls.h>
 
 void
+#ifndef IS_IN_libpthread
+weak_function
+#endif
 __lll_lock_wait_private (int *futex)
 {
   do
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/lowlevellock.c b/libpthread/nptl/sysdeps/unix/sysv/linux/lowlevellock.c
index 1aa7960..2a5bf6d 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/lowlevellock.c
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/lowlevellock.c
@@ -26,6 +26,9 @@
 
 
 void
+#ifndef IS_IN_libpthread
+weak_function
+#endif
 __lll_lock_wait_private (int *futex)
 {
   if (*futex == 2)
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/metag/lowlevellock.c b/libpthread/nptl/sysdeps/unix/sysv/linux/metag/lowlevellock.c
index 8c8955e..960e029 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/metag/lowlevellock.c
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/metag/lowlevellock.c
@@ -24,6 +24,9 @@
 #include <tls.h>
 
 void
+#ifndef IS_IN_libpthread
+weak_function
+#endif
 __lll_lock_wait_private (int *futex)
 {
   do
diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.c b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.c
index 3ff1b73..35c678e 100644
--- a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.c
+++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.c
@@ -25,6 +25,9 @@
 
 
 void
+#ifndef IS_IN_libpthread
+weak_function
+#endif
 __lll_lock_wait_private (int *futex)
 {
   do


More information about the uClibc-cvs mailing list