From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29970 invoked by alias); 23 Feb 2012 15:40:09 -0000 Received: (qmail 29720 invoked by uid 22791); 23 Feb 2012 15:40:04 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,TW_BJ,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from bar.sig21.net (HELO bar.sig21.net) (80.81.252.164) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 23 Feb 2012 15:39:47 +0000 Received: from p5099b351.dip0.t-ipconnect.de ([80.153.179.81] helo=zzz.local) by bar.sig21.net with esmtpsa (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.69) (envelope-from ) id 1S0alg-0003Fg-Pt for crossgcc@sourceware.org; Thu, 23 Feb 2012 16:39:44 +0100 Received: from js by zzz.local with local (Exim 4.77) (envelope-from ) id 1S0alg-0006tY-45 for crossgcc@sourceware.org; Thu, 23 Feb 2012 16:39:40 +0100 Date: Thu, 23 Feb 2012 15:40:00 -0000 From: Johannes Stezenbach To: crossgcc@sourceware.org Subject: [PATCH] ct-ng: uClibc-0.9.33: fix static linking with NPTL Message-ID: <20120223153940.GA26493@sig21.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-21-Score: -2.9 (--) X-Spam-21-Report: No, score=-2.9 required=8.0 tests=ALL_TRUSTED=-1,BAYES_00=-1.9 autolearn=ham X-IsSubscribed: yes Mailing-List: contact crossgcc-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: crossgcc-owner@sourceware.org X-SW-Source: 2012-02/txt/msg00082.txt.bz2 # HG changeset patch # User Johannes Stezenbach # 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 --- 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 +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 + +--- + 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 +Date: Thu May 12 23:47:00 2011 +0200 + + include pthreadP.h for SIGCANCEL + + based on a patch from Kevin Cernekee + + Signed-off-by: Peter S. Mazinger + +--- + 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 + #include + #include ++#ifdef __UCLIBC_HAS_THREADS_NATIVE__ ++# include /* 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 + #include + #include ++#ifdef __UCLIBC_HAS_THREADS_NATIVE__ ++# include /* 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 ++# include /* 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 ++#ifdef __UCLIBC_HAS_THREADS_NATIVE__ ++# include /* SIGCANCEL */ ++#endif + + #undef sigprocmask + -- For unsubscribe information see http://sourceware.org/lists.html#faq