[PATCH] ct-ng: uClibc-0.9.33: fix static linking with NPTL
Johannes Stezenbach
js@sig21.net
Thu Feb 23 15:40:00 GMT 2012
# HG changeset patch
# User Johannes Stezenbach <js@sig21.net>
# Date 1330011238 -3600
# Node ID 9eabd89158098d1be51c45f46120092df0e78097
# Parent 81233445a85c1c3e1f2938685a0737103151345d
uClibc-0.9.33: fix static linking with NPTL
Add upstream patches for uClibc-0.9.33 to fix
static linking with NPTL.
Signed-off-by: Johannes Stezenbach <js@sig21.net>
---
for details see
http://lists.uclibc.org/pipermail/uclibc/2012-February/046421.html
diff -r 81233445a85c -r 9eabd8915809 patches/uClibc/0.9.33/100-uClibc-0.9.33-nptl-fix-static-linking.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/uClibc/0.9.33/100-uClibc-0.9.33-nptl-fix-static-linking.patch Thu Feb 23 16:33:58 2012 +0100
@@ -0,0 +1,72 @@
+commit 8ab3145f396eb35d15466b0666270ba8dad69da5
+Author: Austin Foxley <austinf@cetoncorp.com>
+Date: Fri Apr 22 15:06:18 2011 -0700
+
+ nptl: remove sigaction, sigprocmask, and sigfillset from libpthread
+
+ Having them defined in both places was causing errors with static linking
+
+ Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
+
+---
+ libpthread/nptl/sysdeps/pthread/Makefile.in | 27 ++-------------------------
+ 1 file changed, 2 insertions(+), 25 deletions(-)
+
+--- uClibc-0.9.33.orig/libpthread/nptl/sysdeps/pthread/Makefile.in 2012-02-01 22:21:04.000000000 +0100
++++ uClibc-0.9.33/libpthread/nptl/sysdeps/pthread/Makefile.in 2012-02-20 19:55:03.000000000 +0100
+@@ -33,17 +33,12 @@ libpthread_pthread_CSRC = \
+ pthread_spin_init.c \
+ pthread_spin_unlock.c \
+ pt-longjmp.c \
+- pt-sigaction.c \
+- pt-sigfillset.c \
+- pt-sigprocmask.c \
+ tpp.c
+ CFLAGS-pthread = $(SSP_ALL_CFLAGS) -DNOT_IN_libc -DIS_IN_libpthread
+ CFLAGS-pthread_barrier_wait.c = -D_GNU_SOURCE
+ CFLAGS-pthread_spin_destroy.c = -D_GNU_SOURCE
+ CFLAGS-pthread_spin_init.c = -D_GNU_SOURCE
+ CFLAGS-pthread_spin_unlock.c = -D_GNU_SOURCE
+-CFLAGS-pt-sigfillset.c = -I$(top_srcdir)libc/signal
+-CFLAGS-pt-sigprocmask.c = -I$(top_srcdir)libc/sysdeps/linux/common
+ CFLAGS-unwind-forcedunwind.c = -fexceptions -fasynchronous-unwind-tables
+
+ CFLAGS-OMIT-librt-cancellation.c = -DIS_IN_libpthread
+@@ -53,8 +48,7 @@ CFLAGS-librt-cancellation.c = -DIS_IN_li
+ CFLAGS-rt-unwind-resume.c = -DIS_IN_librt \
+ -fexceptions -fasynchronous-unwind-tables
+
+-libpthread-so-y += $(patsubst %,$(libpthread_pthread_OUT)/%.oS, \
+- pt-sigaction pt-sigprocmask unwind-forcedunwind)
++libpthread-so-y += $(patsubst %,$(libpthread_pthread_OUT)/%.oS, unwind-forcedunwind)
+
+ librt-pt-routines-y = librt-cancellation.c
+ librt-pt-shared-only-routines-y = rt-unwind-resume.c
+@@ -104,26 +98,9 @@ $(libpthread_pthread_OUT)/pt-crtn.S: $(l
+ -e '/@TRAILER_BEGINS/,$$p' $< > $@.tmp
+ $(Q)mv $@.tmp $@
+ endif
+-# It would have been easier to just add dummy files that include the real
+-# impl, but ok.
+-# Special rules needed since we do objdir->objdir compilation for these 3.
+-# First symlink them, then build them. Rob would freak out on these. Sheesh! ;)
+-pthread-lc-fwd = sigfillset sigprocmask
+-$(patsubst %,$(libpthread_pthread_OUT)/pt-%.c,$(pthread-lc-fwd)): | $(libpthread_pthread_OUT)
+- $(do_ln) $(call rel_srcdir)$(patsubst pt-%,$(libpthread_pthread_DIR)/%,$(@F)) $@
+-$(patsubst %,$(libpthread_pthread_OUT)/pt-%.oS,$(pthread-lc-fwd)): $(libpthread_pthread_OUT)/pt-%.oS: $(libpthread_pthread_OUT)/pt-%.c
+- $(compile.c)
+-$(patsubst %,$(libpthread_pthread_OUT)/pt-%.o,$(pthread-lc-fwd)): $(libpthread_pthread_OUT)/pt-%.o: $(libpthread_pthread_OUT)/pt-%.c
+- $(compile.c)
+-ifeq ($(DOPIC),y)
+-$(patsubst %,$(libpthread_pthread_OUT)/pt-%.os,$(pthread-lc-fwd)): $(libpthread_pthread_OUT)/pt-%.os: $(libpthread_pthread_OUT)/pt-%.c
+- $(compile.c)
+-endif
+
+ objclean-y += CLEAN_libpthread/nptl/sysdeps/pthread
+
+ CLEAN_libpthread/nptl/sysdeps/pthread:
+ $(do_rm) $(addprefix $(libpthread_pthread_OUT)/*., o os oS s S) \
+- $(libpthread_pthread_OUT)/defs.h \
+- $(addprefix $(libpthread_pthread_DIR)/, \
+- pt-sigfillset.c pt-sigprocmask.c)
++ $(libpthread_pthread_OUT)/defs.h
diff -r 81233445a85c -r 9eabd8915809 patches/uClibc/0.9.33/101-uClibc-0.9.33-nptl-fix-static-linking-2.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/uClibc/0.9.33/101-uClibc-0.9.33-nptl-fix-static-linking-2.patch Thu Feb 23 16:33:58 2012 +0100
@@ -0,0 +1,63 @@
+commit aed47156856366c6aaf29a54e68fed39733f6bce
+Author: Peter S. Mazinger <ps.m@gmx.net>
+Date: Thu May 12 23:47:00 2011 +0200
+
+ include pthreadP.h for SIGCANCEL
+
+ based on a patch from Kevin Cernekee <cernekee@gmail.com>
+
+ Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
+
+---
+ libc/signal/sigfillset.c | 3 +++
+ libc/sysdeps/linux/c6x/sigaction.c | 3 +++
+ libc/sysdeps/linux/common/__rt_sigtimedwait.c | 1 +
+ libc/sysdeps/linux/common/sigprocmask.c | 3 +++
+ 4 files changed, 10 insertions(+)
+
+--- uClibc-0.9.33.orig/libc/signal/sigfillset.c 2012-02-01 22:21:04.000000000 +0100
++++ uClibc-0.9.33/libc/signal/sigfillset.c 2012-02-20 19:50:28.000000000 +0100
+@@ -19,6 +19,9 @@
+ #include <errno.h>
+ #include <signal.h>
+ #include <string.h>
++#ifdef __UCLIBC_HAS_THREADS_NATIVE__
++# include <pthreadP.h> /* SIGCANCEL */
++#endif
+
+
+ /* Set all signals in SET. */
+--- uClibc-0.9.33.orig/libc/sysdeps/linux/c6x/sigaction.c 2012-02-01 22:21:04.000000000 +0100
++++ uClibc-0.9.33/libc/sysdeps/linux/c6x/sigaction.c 2012-02-20 19:49:25.000000000 +0100
+@@ -28,6 +28,9 @@
+ #include <string.h>
+ #include <sys/syscall.h>
+ #include <bits/kernel_sigaction.h>
++#ifdef __UCLIBC_HAS_THREADS_NATIVE__
++# include <pthreadP.h> /* SIGCANCEL */
++#endif
+
+ #define SA_RESTORER 0x04000000
+
+--- uClibc-0.9.33.orig/libc/sysdeps/linux/common/__rt_sigtimedwait.c 2012-02-01 22:21:04.000000000 +0100
++++ uClibc-0.9.33/libc/sysdeps/linux/common/__rt_sigtimedwait.c 2012-02-20 19:51:28.000000000 +0100
+@@ -16,6 +16,7 @@
+
+ # ifdef __UCLIBC_HAS_THREADS_NATIVE__
+ # include <sysdep-cancel.h>
++# include <pthreadP.h> /* SIGCANCEL */
+
+ static int do_sigtimedwait(const sigset_t *set, siginfo_t *info,
+ const struct timespec *timeout)
+--- uClibc-0.9.33.orig/libc/sysdeps/linux/common/sigprocmask.c 2012-02-01 22:21:04.000000000 +0100
++++ uClibc-0.9.33/libc/sysdeps/linux/common/sigprocmask.c 2012-02-20 19:49:25.000000000 +0100
+@@ -11,6 +11,9 @@
+
+ #if defined __USE_POSIX
+ #include <signal.h>
++#ifdef __UCLIBC_HAS_THREADS_NATIVE__
++# include <pthreadP.h> /* SIGCANCEL */
++#endif
+
+ #undef sigprocmask
+
--
For unsubscribe information see http://sourceware.org/lists.html#faq
More information about the crossgcc
mailing list