public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] ct-ng: uClibc-0.9.33: fix static linking with NPTL
@ 2012-02-23 15:40 Johannes Stezenbach
  2012-02-24 21:52 ` Yann E. MORIN
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Stezenbach @ 2012-02-23 15:40 UTC (permalink / raw)
  To: crossgcc

# 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ct-ng: uClibc-0.9.33: fix static linking with NPTL
  2012-02-23 15:40 [PATCH] ct-ng: uClibc-0.9.33: fix static linking with NPTL Johannes Stezenbach
@ 2012-02-24 21:52 ` Yann E. MORIN
  2012-04-10  7:58   ` Johannes Stezenbach
  0 siblings, 1 reply; 4+ messages in thread
From: Yann E. MORIN @ 2012-02-24 21:52 UTC (permalink / raw)
  To: crossgcc; +Cc: Johannes Stezenbach

Johannes, All,

On Thursday 23 February 2012 16:39:40 Johannes Stezenbach wrote:
> # 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.

Back on-line after a little break... Will look at this this WE (I saw your
posts on the uClibc list).

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ct-ng: uClibc-0.9.33: fix static linking with NPTL
  2012-02-24 21:52 ` Yann E. MORIN
@ 2012-04-10  7:58   ` Johannes Stezenbach
  2012-04-17 10:39     ` Johannes Stezenbach
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Stezenbach @ 2012-04-10  7:58 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc

Hi,

On Fri, Feb 24, 2012 at 10:52:27PM +0100, Yann E. MORIN wrote:
> On Thursday 23 February 2012 16:39:40 Johannes Stezenbach wrote:
> > # 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.
> 
> Back on-line after a little break... Will look at this this WE (I saw your
> posts on the uClibc list).

In uClibc git 0.9.33 branch this patch has been reverted
and replaced by a corrected version.  I ended up using
a patch generated from git with combined fixes from
the 0.9.33 branch.  Since apparently I'm the only
one who cares about static linking with NPTL you might as well
wait for 0.9.33.1.

Johannes

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ct-ng: uClibc-0.9.33: fix static linking with NPTL
  2012-04-10  7:58   ` Johannes Stezenbach
@ 2012-04-17 10:39     ` Johannes Stezenbach
  0 siblings, 0 replies; 4+ messages in thread
From: Johannes Stezenbach @ 2012-04-17 10:39 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc

Hi Yann,

On Tue, Apr 10, 2012 at 09:58:25AM +0200, Johannes Stezenbach wrote:
> 
> In uClibc git 0.9.33 branch this patch has been reverted
> and replaced by a corrected version.  I ended up using
> a patch generated from git with combined fixes from
> the 0.9.33 branch.  Since apparently I'm the only
> one who cares about static linking with NPTL you might as well
> wait for 0.9.33.1.

uClibc-0.9.33.1 has been released on April 11.
I'm currently too busy to send a patch, in case
you have a few spare cycles left between all your
other work, please add it.

Thank you,
Johannes

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-04-17 10:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-23 15:40 [PATCH] ct-ng: uClibc-0.9.33: fix static linking with NPTL Johannes Stezenbach
2012-02-24 21:52 ` Yann E. MORIN
2012-04-10  7:58   ` Johannes Stezenbach
2012-04-17 10:39     ` Johannes Stezenbach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).