patches/uClibc/0.9.30.2/150-LT-pthread_atfork-unhide.patch
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Tue Jul 31 22:27:29 2012 +0200 (2012-07-31)
changeset 3018 7776e8369284
permissions -rw-r--r--
complibs/cloog: create missing m4 dir

Because we now patch configure.in and configure, the Makefile quicks
in a re-build rule as the source files are now more recent than the
bundled generated files, and that fails because the m4 directory
is missing, although on some systems where aclocal is not installed,
the re-build rule does nothing (except a warning).

Always create tht directory.

Reported-by: Per Arnold Blaasmo <per-arnold.blaasmo@atmel.com>
[Also thanks to Thomas De Schampheleire <patrickdepinguin@gmail.com>
for some digging works on this issue]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.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