patches/uClibc/0.9.30.2/150-LT-pthread_atfork-unhide.patch
author Michael Hope <michael.hope@linaro.org>
Wed Oct 19 15:27:32 2011 +1300 (2011-10-19)
changeset 2739 f320e22f2cba
permissions -rw-r--r--
arch: add softfp support

Some architectures support a mixed hard/soft floating point, where
the compiler emits hardware floating point instructions, but passes
the operands in core (aka integer) registers.

For example, ARM supports this mode (to come in the next changeset).

Add support for softfp cross compilers to the GCC and GLIBC
configuration. Needed for Ubuntu and other distros that are softfp.

Signed-off-by: Michael Hope <michael.hope@linaro.org>
[yann.morin.1998@anciens.enib.fr: split the original patch]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
     1 From a05c4380c5aaa6e107a4c7e1e5a139ec4cc43f0c Mon Sep 17 00:00:00 2001
     2 From: Henning Heinold <heinold@inf.fu-berlin.de>
     3 Date: Sun, 21 Feb 2010 11:55:32 +0100
     4 Subject: [PATCH 14/15] LT pthread_atfork: unhide
     5 
     6 Trying to compile perl with uClibc new linuxthreads on arm.
     7 I run into the problem that pthread_atfork is not available.
     8 The problem was that it was synced with the glibc version, which has
     9 compat ifdefs we do not need in uClibc. The inital checked in version
    10 is right and works. So either revert the commit 2 years ago
    11 or patch it with the patch attached I made for openembedded.
    12 
    13 Signed-off-by: Henning Heinold <heinold@inf.fu-berlin.de>
    14 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
    15 ---
    16  libpthread/linuxthreads/Makefile.in      |    2 +-
    17  libpthread/linuxthreads/pthread_atfork.c |   13 +++----------
    18  2 files changed, 4 insertions(+), 11 deletions(-)
    19 
    20 diff --git a/libpthread/linuxthreads/Makefile.in b/libpthread/linuxthreads/Makefile.in
    21 index 947dea9..d53b5fa 100644
    22 --- a/libpthread/linuxthreads/Makefile.in
    23 +++ b/libpthread/linuxthreads/Makefile.in
    24 @@ -45,7 +45,7 @@ pthread_sysdep_SRC := $(patsubst %,$(libpthread_DIR)/sysdeps/pthread/%.c,$(pthre
    25  pthread_SRC := \
    26  	attr barrier cancel condvar errno events join pthread \
    27  	lockfile manager mutex pt-machine ptcleanup \
    28 -	ptclock_gettime ptclock_settime ptfork pthandles \
    29 +	ptclock_gettime ptclock_settime ptfork pthandles pthread_atfork \
    30  	pthread_setegid pthread_seteuid pthread_setgid pthread_setregid \
    31  	pthread_setresgid pthread_setresuid pthread_setreuid pthread_setuid \
    32  	rwlock semaphore sighandler signals specific spinlock
    33 diff --git a/libpthread/linuxthreads/pthread_atfork.c b/libpthread/linuxthreads/pthread_atfork.c
    34 index 2464acb..4c83dd0 100644
    35 --- a/libpthread/linuxthreads/pthread_atfork.c
    36 +++ b/libpthread/linuxthreads/pthread_atfork.c
    37 @@ -43,12 +43,8 @@ extern void *__dso_handle __attribute__ ((__weak__));
    38  
    39  /* Hide the symbol so that no definition but the one locally in the
    40     executable or DSO is used.  */
    41 -int
    42 -#ifndef __pthread_atfork
    43 -/* Don't mark the compatibility function as hidden.  */
    44 -attribute_hidden
    45 -#endif
    46 -__pthread_atfork (prepare, parent, child)
    47 +
    48 +int attribute_hidden __pthread_atfork (prepare, parent, child)
    49       void (*prepare) (void);
    50       void (*parent) (void);
    51       void (*child) (void);
    52 @@ -56,8 +52,5 @@ __pthread_atfork (prepare, parent, child)
    53    return __register_atfork (prepare, parent, child,
    54  			    &__dso_handle == NULL ? NULL : __dso_handle);
    55  }
    56 -#ifndef __pthread_atfork
    57 -extern int pthread_atfork (void (*prepare) (void), void (*parent) (void),
    58 -			   void (*child) (void)) attribute_hidden;
    59 +
    60  strong_alias (__pthread_atfork, pthread_atfork)
    61 -#endif
    62 -- 
    63 1.6.6.1
    64