summaryrefslogtreecommitdiff
path: root/patches/glibc/linuxthreads-2.2.5
diff options
context:
space:
mode:
Diffstat (limited to 'patches/glibc/linuxthreads-2.2.5')
-rw-r--r--patches/glibc/linuxthreads-2.2.5/glibc-2.2.5-allow-gcc-3.4-td.patch881
-rw-r--r--patches/glibc/linuxthreads-2.2.5/glibc-2.2.5-alpha-self-clobber.patch25
-rw-r--r--patches/glibc/linuxthreads-2.2.5/linuxthreads-2.2.5-ppc405erratum77.patch34
-rw-r--r--patches/glibc/linuxthreads-2.2.5/pt-initfini-alpha.patch119
-rw-r--r--patches/glibc/linuxthreads-2.2.5/pt-initfini-sh.patch267
-rw-r--r--patches/glibc/linuxthreads-2.2.5/threadparam.patch69
6 files changed, 1395 insertions, 0 deletions
diff --git a/patches/glibc/linuxthreads-2.2.5/glibc-2.2.5-allow-gcc-3.4-td.patch b/patches/glibc/linuxthreads-2.2.5/glibc-2.2.5-allow-gcc-3.4-td.patch
new file mode 100644
index 0000000..0a6cee1
--- /dev/null
+++ b/patches/glibc/linuxthreads-2.2.5/glibc-2.2.5-allow-gcc-3.4-td.patch
@@ -0,0 +1,881 @@
+Fixes following error building glibc-2.2.5 with gcc-3.4:
+td_init.c: In function `td_init':
+td_init.c:30: error: parse error before string constant
+td_init.c:30: error: parse error before string constant
+make[2]: *** [/home/dank/wk/crosstool-0.28-rc4h/build/i686-unknown-linux-gnu/gcc-3.4.0-20040406-glibc-2.2.5/build-glibc/linuxthreads_db/td_init.os] Error 1
+
+# Retrieved by diffing a +-1 day rng around the time mentioned
+# in http://sources.redhat.com/ml/glibc-cvs/2001-q4/msg00654.html
+# cvs -z 9 -d :pserver:anoncvs@sources.redhat.com:/cvs/glibc diff -u -D"2001-12-27 08:41:30" -D"2001-12-29 08:41:32"
+# then fixing paths.
+
+Index: ChangeLog
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/ChangeLog,v
+retrieving revision 1.41
+retrieving revision 1.42
+diff -u -r1.41 -r1.42
+--- libc/linuxthreads_db/ChangeLog 13 Apr 2001 00:09:54 -0000 1.41
++++ libc/linuxthreads_db/ChangeLog 29 Dec 2001 00:59:58 -0000 1.42
+@@ -1,3 +1,43 @@
++2001-12-28 Andreas Jaeger <aj@suse.de>
++
++ * td_init.c (td_init): Don't use __FUNCTION__ as literal.
++ * td_log.c (td_log): Likewise.
++ * td_ta_delete.c (td_ta_delete): Likewise.
++ * td_ta_get_nthreads.c (td_ta_get_nthreads): Likewise.
++ * td_ta_get_ph.c (td_ta_get_ph): Likewise.
++ * td_ta_map_id2thr.c (td_ta_map_id2thr): Likewise.
++ * td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Likewise.
++ * td_ta_new.c (td_ta_new): Likewise.
++ * td_ta_clear_event.c (td_ta_clear_event): Likewise.
++ * td_ta_enable_stats.c (td_ta_enable_stats): Likewise.
++ * td_ta_event_addr.c (td_ta_event_addr): Likewise.
++ * td_ta_event_getmsg.c (td_ta_event_getmsg): Likewise.
++ * td_ta_get_stats.c (td_ta_get_stats): Likewise.
++ * td_ta_reset_stats.c (td_ta_reset_stats): Likewise.
++ * td_ta_set_event.c (td_ta_set_event): Likewise.
++ * td_ta_setconcurrency.c (td_ta_setconcurrency): Likewise.
++ * td_ta_thr_iter.c (td_ta_thr_iter): Likewise.
++ * td_ta_tsd_iter.c (td_ta_tsd_iter): Likewise.
++ * td_thr_clear_event.c (td_thr_clear_event): Likewise.
++ * td_thr_dbresume.c (td_thr_dbresume): Likewise.
++ * td_thr_dbsuspend.c (td_thr_dbsuspend): Likewise.
++ * td_thr_event_enable.c (td_thr_event_enable): Likewise.
++ * td_thr_event_getmsg.c (td_thr_event_getmsg): Likewise.
++ * td_thr_get_info.c (td_thr_get_info): Likewise.
++ * td_thr_getfpregs.c (td_thr_getfpregs): Likewise.
++ * td_thr_getgregs.c (td_thr_getgregs): Likewise.
++ * td_thr_getxregs.c (td_thr_getxregs): Likewise.
++ * td_thr_getxregsize.c (td_thr_getxregsize): Likewise.
++ * td_thr_set_event.c (td_thr_set_event): Likewise.
++ * td_thr_setfpregs.c (td_thr_setfpregs): Likewise.
++ * td_thr_setgregs.c (td_thr_setgregs): Likewise.
++ * td_thr_setprio.c (td_thr_setprio): Likewise.
++ * td_thr_setsigpending.c (td_thr_setsigpending): Likewise.
++ * td_thr_setxregs.c (td_thr_setxregs): Likewise.
++ * td_thr_sigsetmask.c (td_thr_sigsetmask): Likewise.
++ * td_thr_tsd.c (td_thr_tsd): Likewise.
++ * td_thr_validate.c (td_thr_validate): Likewise.
++
+ 2001-04-12 Ulrich Drepper <drepper@redhat.com>
+
+ * td_ta_map_id2thr.c: If thread terminated return TD_NOTHR.
+Index: td_init.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_init.c,v
+retrieving revision 1.3
+retrieving revision 1.4
+diff -u -r1.3 -r1.4
+--- libc/linuxthreads_db/td_init.c 6 Jul 2001 05:27:23 -0000 1.3
++++ libc/linuxthreads_db/td_init.c 28 Dec 2001 16:41:29 -0000 1.4
+@@ -1,5 +1,5 @@
+ /* Initialization function of thread debugger support library.
+- Copyright (C) 1999 Free Software Foundation, Inc.
++ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+@@ -27,6 +27,6 @@
+ td_init (void)
+ {
+ /* XXX We have to figure out what has to be done. */
+- LOG (__FUNCTION__);
++ LOG ("td_init");
+ return TD_OK;
+ }
+Index: td_log.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_log.c,v
+retrieving revision 1.2
+retrieving revision 1.3
+diff -u -r1.2 -r1.3
+--- libc/linuxthreads_db/td_log.c 6 Jul 2001 05:27:23 -0000 1.2
++++ libc/linuxthreads_db/td_log.c 28 Dec 2001 16:41:29 -0000 1.3
+@@ -1,5 +1,5 @@
+ /* Noop, left for historical reasons.
+- Copyright (C) 1999 Free Software Foundation, Inc.
++ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+@@ -25,8 +25,8 @@
+ td_log (void)
+ {
+ /* This interface is deprecated in the Sun interface. We provide it
+- for compatibility but don't do anyhting ourself. We might in
++ for compatibility but don't do anything ourself. We might in
+ future do some logging if this seems reasonable. */
+- LOG (__FUNCTION__);
++ LOG ("td_log");
+ return TD_OK;
+ }
+Index: td_ta_clear_event.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_clear_event.c,v
+retrieving revision 1.3
+retrieving revision 1.4
+diff -u -r1.3 -r1.4
+--- libc/linuxthreads_db/td_ta_clear_event.c 6 Jul 2001 05:27:23 -0000 1.3
++++ libc/linuxthreads_db/td_ta_clear_event.c 28 Dec 2001 16:41:29 -0000 1.4
+@@ -1,5 +1,5 @@
+ /* Globally disable events.
+- Copyright (C) 1999 Free Software Foundation, Inc.
++ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+@@ -29,7 +29,7 @@
+ td_thr_events_t old_event;
+ int i;
+
+- LOG (__FUNCTION__);
++ LOG ("td_ta_clear_event");
+
+ /* Test whether the TA parameter is ok. */
+ if (! ta_ok (ta))
+Index: td_ta_delete.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_delete.c,v
+retrieving revision 1.3
+retrieving revision 1.4
+diff -u -r1.3 -r1.4
+--- libc/linuxthreads_db/td_ta_delete.c 6 Jul 2001 05:27:23 -0000 1.3
++++ libc/linuxthreads_db/td_ta_delete.c 28 Dec 2001 16:41:29 -0000 1.4
+@@ -1,5 +1,5 @@
+ /* Detach to target process.
+- Copyright (C) 1999 Free Software Foundation, Inc.
++ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+@@ -26,7 +26,7 @@
+ td_err_e
+ td_ta_delete (td_thragent_t *ta)
+ {
+- LOG (__FUNCTION__);
++ LOG ("td_ta_delete");
+
+ /* Safety check. */
+ if (ta == NULL || __td_agent_list == NULL)
+Index: td_ta_enable_stats.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_enable_stats.c,v
+retrieving revision 1.3
+retrieving revision 1.4
+diff -u -r1.3 -r1.4
+--- libc/linuxthreads_db/td_ta_enable_stats.c 6 Jul 2001 05:27:23 -0000 1.3
++++ libc/linuxthreads_db/td_ta_enable_stats.c 28 Dec 2001 16:41:29 -0000 1.4
+@@ -1,5 +1,5 @@
+ /* Enable collection of statistics for process.
+- Copyright (C) 1999 Free Software Foundation, Inc.
++ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+@@ -25,7 +25,7 @@
+ td_ta_enable_stats (const td_thragent_t *ta, int enable)
+ {
+ /* XXX We have to figure out what has to be done. */
+- LOG (__FUNCTION__);
++ LOG ("td_ta_enable_stats");
+
+ /* Test whether the TA parameter is ok. */
+ if (! ta_ok (ta))
+Index: td_ta_event_addr.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_event_addr.c,v
+retrieving revision 1.5
+retrieving revision 1.6
+diff -u -r1.5 -r1.6
+--- libc/linuxthreads_db/td_ta_event_addr.c 6 Jul 2001 05:27:23 -0000 1.5
++++ libc/linuxthreads_db/td_ta_event_addr.c 28 Dec 2001 16:41:29 -0000 1.6
+@@ -27,7 +27,7 @@
+ td_err_e res = TD_NOEVENT;
+ int idx = -1;
+
+- LOG (__FUNCTION__);
++ LOG ("td_ta_event_addr");
+
+ /* Test whether the TA parameter is ok. */
+ if (! ta_ok (ta))
+Index: td_ta_event_getmsg.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_event_getmsg.c,v
+retrieving revision 1.5
+retrieving revision 1.6
+diff -u -r1.5 -r1.6
+--- libc/linuxthreads_db/td_ta_event_getmsg.c 6 Jul 2001 05:27:23 -0000 1.5
++++ libc/linuxthreads_db/td_ta_event_getmsg.c 28 Dec 2001 16:41:29 -0000 1.6
+@@ -1,5 +1,5 @@
+ /* Retrieve event.
+- Copyright (C) 1999 Free Software Foundation, Inc.
++ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+@@ -32,7 +32,7 @@
+ td_eventbuf_t event;
+ psaddr_t addr;
+
+- LOG (__FUNCTION__);
++ LOG ("td_ta_event_getmsg");
+
+ /* Test whether the TA parameter is ok. */
+ if (! ta_ok (ta))
+Index: td_ta_get_nthreads.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_get_nthreads.c,v
+retrieving revision 1.5
+retrieving revision 1.6
+diff -u -r1.5 -r1.6
+--- libc/linuxthreads_db/td_ta_get_nthreads.c 6 Jul 2001 05:27:23 -0000 1.5
++++ libc/linuxthreads_db/td_ta_get_nthreads.c 28 Dec 2001 16:41:29 -0000 1.6
+@@ -25,7 +25,7 @@
+ {
+ psaddr_t addr;
+
+- LOG (__FUNCTION__);
++ LOG ("td_ta_get_nthreads");
+
+ /* Test whether the TA parameter is ok. */
+ if (! ta_ok (ta))
+Index: td_ta_get_ph.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_get_ph.c,v
+retrieving revision 1.3
+retrieving revision 1.4
+diff -u -r1.3 -r1.4
+--- libc/linuxthreads_db/td_ta_get_ph.c 6 Jul 2001 05:27:23 -0000 1.3
++++ libc/linuxthreads_db/td_ta_get_ph.c 28 Dec 2001 16:41:29 -0000 1.4
+@@ -1,5 +1,5 @@
+ /* Get external process handle.
+- Copyright (C) 1999 Free Software Foundation, Inc.
++ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+@@ -24,7 +24,7 @@
+ td_err_e
+ td_ta_get_ph (const td_thragent_t *ta, struct ps_prochandle **ph)
+ {
+- LOG (__FUNCTION__);
++ LOG ("td_ta_get_ph");
+
+ /* Test whether the TA parameter is ok. */
+ if (! ta_ok (ta))
+Index: td_ta_get_stats.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_get_stats.c,v
+retrieving revision 1.3
+retrieving revision 1.4
+diff -u -r1.3 -r1.4
+--- libc/linuxthreads_db/td_ta_get_stats.c 6 Jul 2001 05:27:23 -0000 1.3
++++ libc/linuxthreads_db/td_ta_get_stats.c 28 Dec 2001 16:41:29 -0000 1.4
+@@ -1,5 +1,5 @@
+ /* Retrieve statistics for process.
+- Copyright (C) 1999 Free Software Foundation, Inc.
++ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+@@ -25,7 +25,7 @@
+ td_ta_get_stats (const td_thragent_t *ta, td_ta_stats_t *statsp)
+ {
+ /* XXX We have to figure out what has to be done. */
+- LOG (__FUNCTION__);
++ LOG ("td_ta_get_stats");
+
+ /* Test whether the TA parameter is ok. */
+ if (! ta_ok (ta))
+Index: td_ta_map_id2thr.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_map_id2thr.c,v
+retrieving revision 1.4
+retrieving revision 1.5
+diff -u -r1.4 -r1.5
+--- libc/linuxthreads_db/td_ta_map_id2thr.c 6 Jul 2001 05:27:23 -0000 1.4
++++ libc/linuxthreads_db/td_ta_map_id2thr.c 28 Dec 2001 16:41:29 -0000 1.5
+@@ -28,7 +28,7 @@
+ struct _pthread_descr_struct pds;
+ int pthread_threads_max;
+
+- LOG (__FUNCTION__);
++ LOG ("td_ta_map_id2thr");
+
+ /* Test whether the TA parameter is ok. */
+ if (! ta_ok (ta))
+Index: td_ta_map_lwp2thr.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_map_lwp2thr.c,v
+retrieving revision 1.5
+retrieving revision 1.6
+diff -u -r1.5 -r1.6
+--- libc/linuxthreads_db/td_ta_map_lwp2thr.c 6 Jul 2001 05:27:23 -0000 1.5
++++ libc/linuxthreads_db/td_ta_map_lwp2thr.c 28 Dec 2001 16:41:29 -0000 1.6
+@@ -1,5 +1,5 @@
+ /* Which thread is running on an lwp?
+- Copyright (C) 1999 Free Software Foundation, Inc.
++ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+@@ -34,7 +34,7 @@
+ # define num 1
+ #endif
+
+- LOG (__FUNCTION__);
++ LOG ("td_ta_map_lwp2thr");
+
+ /* Test whether the TA parameter is ok. */
+ if (! ta_ok (ta))
+Index: td_ta_new.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_new.c,v
+retrieving revision 1.10
+retrieving revision 1.11
+diff -u -r1.10 -r1.11
+--- libc/linuxthreads_db/td_ta_new.c 6 Jul 2001 05:27:23 -0000 1.10
++++ libc/linuxthreads_db/td_ta_new.c 28 Dec 2001 16:41:29 -0000 1.11
+@@ -35,7 +35,7 @@
+ psaddr_t addr;
+ struct agent_list *elemp;
+
+- LOG (__FUNCTION__);
++ LOG ("td_ta_new");
+
+ /* Get the global event mask. This is one of the variables which
+ are new in the thread library to enable debugging. If it is
+Index: td_ta_reset_stats.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_reset_stats.c,v
+retrieving revision 1.3
+retrieving revision 1.4
+diff -u -r1.3 -r1.4
+--- libc/linuxthreads_db/td_ta_reset_stats.c 6 Jul 2001 05:27:23 -0000 1.3
++++ libc/linuxthreads_db/td_ta_reset_stats.c 28 Dec 2001 16:41:29 -0000 1.4
+@@ -1,5 +1,5 @@
+ /* Reset statistics.
+- Copyright (C) 1999 Free Software Foundation, Inc.
++ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+@@ -25,7 +25,7 @@
+ td_ta_reset_stats (const td_thragent_t *ta)
+ {
+ /* XXX We have to figure out what has to be done. */
+- LOG (__FUNCTION__);
++ LOG ("td_ta_reset_stats");
+
+ /* Test whether the TA parameter is ok. */
+ if (! ta_ok (ta))
+Index: td_ta_set_event.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_set_event.c,v
+retrieving revision 1.4
+retrieving revision 1.5
+diff -u -r1.4 -r1.5
+--- libc/linuxthreads_db/td_ta_set_event.c 6 Jul 2001 05:27:23 -0000 1.4
++++ libc/linuxthreads_db/td_ta_set_event.c 28 Dec 2001 16:41:29 -0000 1.5
+@@ -1,5 +1,5 @@
+ /* Globally enable events.
+- Copyright (C) 1999 Free Software Foundation, Inc.
++ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+@@ -29,7 +29,7 @@
+ td_thr_events_t old_event;
+ int i;
+
+- LOG (__FUNCTION__);
++ LOG ("td_ta_set_event");
+
+ /* Test whether the TA parameter is ok. */
+ if (! ta_ok (ta))
+Index: td_ta_setconcurrency.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_setconcurrency.c,v
+retrieving revision 1.3
+retrieving revision 1.4
+diff -u -r1.3 -r1.4
+--- libc/linuxthreads_db/td_ta_setconcurrency.c 6 Jul 2001 05:27:23 -0000 1.3
++++ libc/linuxthreads_db/td_ta_setconcurrency.c 28 Dec 2001 16:41:29 -0000 1.4
+@@ -1,5 +1,5 @@
+ /* Set suggested concurrency level for process.
+- Copyright (C) 1999 Free Software Foundation, Inc.
++ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+@@ -25,7 +25,7 @@
+ td_ta_setconcurrency (const td_thragent_t *ta, int level)
+ {
+ /* This is something LinuxThreads does not support. */
+- LOG (__FUNCTION__);
++ LOG ("td_ta_setconcurrency");
+
+ /* Test whether the TA parameter is ok. */
+ if (! ta_ok (ta))
+Index: td_ta_thr_iter.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_thr_iter.c,v
+retrieving revision 1.11
+retrieving revision 1.12
+diff -u -r1.11 -r1.12
+--- libc/linuxthreads_db/td_ta_thr_iter.c 6 Jul 2001 05:27:23 -0000 1.11
++++ libc/linuxthreads_db/td_ta_thr_iter.c 28 Dec 2001 16:41:29 -0000 1.12
+@@ -1,5 +1,5 @@
+ /* Iterate over a process's threads.
+- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
++ Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+@@ -86,7 +86,7 @@
+ # define num 1
+ #endif
+
+- LOG (__FUNCTION__);
++ LOG ("td_ta_thr_iter");
+
+ /* Test whether the TA parameter is ok. */
+ if (! ta_ok (ta))
+Index: td_ta_tsd_iter.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_ta_tsd_iter.c,v
+retrieving revision 1.4
+retrieving revision 1.5
+diff -u -r1.4 -r1.5
+--- libc/linuxthreads_db/td_ta_tsd_iter.c 6 Jul 2001 05:27:23 -0000 1.4
++++ libc/linuxthreads_db/td_ta_tsd_iter.c 28 Dec 2001 16:41:29 -0000 1.5
+@@ -1,5 +1,5 @@
+ /* Iterate over a process's thread-specific data.
+- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
++ Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+@@ -29,7 +29,7 @@
+ int pthread_keys_max;
+ int cnt;
+
+- LOG (__FUNCTION__);
++ LOG ("td_ta_tsd_iter");
+
+ /* Test whether the TA parameter is ok. */
+ if (! ta_ok (ta))
+Index: td_thr_clear_event.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_clear_event.c,v
+retrieving revision 1.3
+retrieving revision 1.4
+diff -u -r1.3 -r1.4
+--- libc/linuxthreads_db/td_thr_clear_event.c 6 Jul 2001 05:27:23 -0000 1.3
++++ libc/linuxthreads_db/td_thr_clear_event.c 28 Dec 2001 16:41:29 -0000 1.4
+@@ -1,5 +1,5 @@
+ /* Disable specific event for thread.
+- Copyright (C) 1999 Free Software Foundation, Inc.
++ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+@@ -31,7 +31,7 @@
+ td_thr_events_t old_event;
+ int i;
+
+- LOG (__FUNCTION__);
++ LOG ("td_thr_clear_event");
+
+ /* Write the new value into the thread data structure. */
+ if (ps_pdread (th->th_ta_p->ph,
+Index: td_thr_dbresume.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_dbresume.c,v
+retrieving revision 1.2
+retrieving revision 1.3
+diff -u -r1.2 -r1.3
+--- libc/linuxthreads_db/td_thr_dbresume.c 6 Jul 2001 05:27:23 -0000 1.2
++++ libc/linuxthreads_db/td_thr_dbresume.c 28 Dec 2001 16:41:29 -0000 1.3
+@@ -1,5 +1,5 @@
+ /* Resume execution of given thread.
+- Copyright (C) 1999 Free Software Foundation, Inc.
++ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+@@ -25,6 +25,6 @@
+ td_thr_dbresume (const td_thrhandle_t *th)
+ {
+ /* XXX We have to figure out what has to be done. */
+- LOG (__FUNCTION__);
++ LOG ("td_thr_dbresume");
+ return TD_NOCAPAB;
+ }
+Index: td_thr_dbsuspend.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_dbsuspend.c,v
+retrieving revision 1.2
+retrieving revision 1.3
+diff -u -r1.2 -r1.3
+--- libc/linuxthreads_db/td_thr_dbsuspend.c 6 Jul 2001 05:27:23 -0000 1.2
++++ libc/linuxthreads_db/td_thr_dbsuspend.c 28 Dec 2001 16:41:29 -0000 1.3
+@@ -1,5 +1,5 @@
+ /* Suspend execution of given thread.
+- Copyright (C) 1999 Free Software Foundation, Inc.
++ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+@@ -25,6 +25,6 @@
+ td_thr_dbsuspend (const td_thrhandle_t *th)
+ {
+ /* XXX We have to figure out what has to be done. */
+- LOG (__FUNCTION__);
++ LOG ("td_thr_dbsuspend");
+ return TD_NOCAPAB;
+ }
+Index: td_thr_event_enable.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_event_enable.c,v
+retrieving revision 1.3
+retrieving revision 1.4
+diff -u -r1.3 -r1.4
+--- libc/linuxthreads_db/td_thr_event_enable.c 6 Jul 2001 05:27:23 -0000 1.3
++++ libc/linuxthreads_db/td_thr_event_enable.c 28 Dec 2001 16:41:29 -0000 1.4
+@@ -1,5 +1,5 @@
+ /* Enable event process-wide.
+- Copyright (C) 1999 Free Software Foundation, Inc.
++ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+@@ -28,7 +28,7 @@
+ const td_thrhandle_t *th;
+ int onoff;
+ {
+- LOG (__FUNCTION__);
++ LOG ("td_thr_event_enable");
+
+ /* Write the new value into the thread data structure. */
+ if (ps_pdwrite (th->th_ta_p->ph,
+Index: td_thr_event_getmsg.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_event_getmsg.c,v
+retrieving revision 1.3
+retrieving revision 1.4
+diff -u -r1.3 -r1.4
+--- libc/linuxthreads_db/td_thr_event_getmsg.c 6 Jul 2001 05:27:23 -0000 1.3
++++ libc/linuxthreads_db/td_thr_event_getmsg.c 28 Dec 2001 16:41:29 -0000 1.4
+@@ -1,5 +1,5 @@
+ /* Retrieve event.
+- Copyright (C) 1999 Free Software Foundation, Inc.
++ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+@@ -29,7 +29,7 @@
+ {
+ td_eventbuf_t event;
+
+- LOG (__FUNCTION__);
++ LOG ("td_thr_event_getmsg");
+
+ /* Read the even structure from the target. */
+ if (ps_pdread (th->th_ta_p->ph,
+Index: td_thr_get_info.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_get_info.c,v
+retrieving revision 1.9
+retrieving revision 1.10
+diff -u -r1.9 -r1.10
+--- libc/linuxthreads_db/td_thr_get_info.c 6 Jul 2001 05:27:23 -0000 1.9
++++ libc/linuxthreads_db/td_thr_get_info.c 28 Dec 2001 16:41:29 -0000 1.10
+@@ -1,5 +1,5 @@
+ /* Get thread information.
+- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
++ Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+@@ -29,7 +29,7 @@
+ {
+ struct _pthread_descr_struct pds;
+
+- LOG (__FUNCTION__);
++ LOG ("td_thr_get_info");
+
+ /* Get the thread descriptor. */
+ if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
+Index: td_thr_getfpregs.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_getfpregs.c,v
+retrieving revision 1.4
+retrieving revision 1.5
+diff -u -r1.4 -r1.5
+--- libc/linuxthreads_db/td_thr_getfpregs.c 6 Jul 2001 05:27:23 -0000 1.4
++++ libc/linuxthreads_db/td_thr_getfpregs.c 28 Dec 2001 16:41:29 -0000 1.5
+@@ -26,7 +26,7 @@
+ {
+ struct _pthread_descr_struct pds;
+
+- LOG (__FUNCTION__);
++ LOG ("td_thr_getfpregs");
+
+ /* We have to get the state and the PID for this thread. */
+ if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
+Index: td_thr_getgregs.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_getgregs.c,v
+retrieving revision 1.8
+retrieving revision 1.9
+diff -u -r1.8 -r1.9
+--- libc/linuxthreads_db/td_thr_getgregs.c 6 Jul 2001 05:27:23 -0000 1.8
++++ libc/linuxthreads_db/td_thr_getgregs.c 28 Dec 2001 16:41:29 -0000 1.9
+@@ -26,7 +26,7 @@
+ {
+ struct _pthread_descr_struct pds;
+
+- LOG (__FUNCTION__);
++ LOG ("td_thr_getgregs");
+
+ /* We have to get the state and the PID for this thread. */
+ if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
+Index: td_thr_getxregs.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_getxregs.c,v
+retrieving revision 1.2
+retrieving revision 1.3
+diff -u -r1.2 -r1.3
+--- libc/linuxthreads_db/td_thr_getxregs.c 6 Jul 2001 05:27:23 -0000 1.2
++++ libc/linuxthreads_db/td_thr_getxregs.c 28 Dec 2001 16:41:29 -0000 1.3
+@@ -1,5 +1,5 @@
+ /* Get a thread's extra state register set.
+- Copyright (C) 1999 Free Software Foundation, Inc.
++ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+@@ -25,6 +25,6 @@
+ td_thr_getxregs (const td_thrhandle_t *th, void *xregs)
+ {
+ /* XXX This might be platform specific. */
+- LOG (__FUNCTION__);
++ LOG ("td_thr_getxregs");
+ return TD_NOXREGS;
+ }
+Index: td_thr_getxregsize.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_getxregsize.c,v
+retrieving revision 1.2
+retrieving revision 1.3
+diff -u -r1.2 -r1.3
+--- libc/linuxthreads_db/td_thr_getxregsize.c 6 Jul 2001 05:27:23 -0000 1.2
++++ libc/linuxthreads_db/td_thr_getxregsize.c 28 Dec 2001 16:41:29 -0000 1.3
+@@ -1,5 +1,5 @@
+ /* Get the size of the extra state register set for this architecture.
+- Copyright (C) 1999 Free Software Foundation, Inc.
++ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+@@ -25,6 +25,6 @@
+ td_thr_getxregsize (const td_thrhandle_t *th, int *sizep)
+ {
+ /* XXX This might be platform specific. */
+- LOG (__FUNCTION__);
++ LOG ("td_thr_getxregsize");
+ return TD_NOXREGS;
+ }
+Index: td_thr_set_event.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_set_event.c,v
+retrieving revision 1.4
+retrieving revision 1.5
+diff -u -r1.4 -r1.5
+--- libc/linuxthreads_db/td_thr_set_event.c 6 Jul 2001 05:27:23 -0000 1.4
++++ libc/linuxthreads_db/td_thr_set_event.c 28 Dec 2001 16:41:29 -0000 1.5
+@@ -1,5 +1,5 @@
+ /* Enable specific event for thread.
+- Copyright (C) 1999 Free Software Foundation, Inc.
++ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+@@ -31,7 +31,7 @@
+ td_thr_events_t old_event;
+ int i;
+
+- LOG (__FUNCTION__);
++ LOG ("td_thr_set_event");
+
+ /* Write the new value into the thread data structure. */
+ if (ps_pdread (th->th_ta_p->ph,
+Index: td_thr_setfpregs.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_setfpregs.c,v
+retrieving revision 1.4
+retrieving revision 1.5
+diff -u -r1.4 -r1.5
+--- libc/linuxthreads_db/td_thr_setfpregs.c 6 Jul 2001 05:27:23 -0000 1.4
++++ libc/linuxthreads_db/td_thr_setfpregs.c 28 Dec 2001 16:41:29 -0000 1.5
+@@ -26,7 +26,7 @@
+ {
+ struct _pthread_descr_struct pds;
+
+- LOG (__FUNCTION__);
++ LOG ("td_thr_setfpregs");
+
+ /* We have to get the state and the PID for this thread. */
+ if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
+Index: td_thr_setgregs.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_setgregs.c,v
+retrieving revision 1.6
+retrieving revision 1.7
+diff -u -r1.6 -r1.7
+--- libc/linuxthreads_db/td_thr_setgregs.c 6 Jul 2001 05:27:23 -0000 1.6
++++ libc/linuxthreads_db/td_thr_setgregs.c 28 Dec 2001 16:41:29 -0000 1.7
+@@ -26,7 +26,7 @@
+ {
+ struct _pthread_descr_struct pds;
+
+- LOG (__FUNCTION__);
++ LOG ("td_thr_setgregs");
+
+ /* We have to get the state and the PID for this thread. */
+ if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
+Index: td_thr_setprio.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_setprio.c,v
+retrieving revision 1.2
+retrieving revision 1.3
+diff -u -r1.2 -r1.3
+--- libc/linuxthreads_db/td_thr_setprio.c 6 Jul 2001 05:27:23 -0000 1.2
++++ libc/linuxthreads_db/td_thr_setprio.c 28 Dec 2001 16:41:29 -0000 1.3
+@@ -1,5 +1,5 @@
+ /* Set a thread's priority.
+- Copyright (C) 1999 Free Software Foundation, Inc.
++ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+@@ -25,6 +25,6 @@
+ td_thr_setprio (const td_thrhandle_t *th, int prio)
+ {
+ /* XXX We have to figure out what has to be done. */
+- LOG (__FUNCTION__);
++ LOG ("td_thr_setprio");
+ return TD_OK;
+ }
+Index: td_thr_setsigpending.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_setsigpending.c,v
+retrieving revision 1.2
+retrieving revision 1.3
+diff -u -r1.2 -r1.3
+--- libc/linuxthreads_db/td_thr_setsigpending.c 6 Jul 2001 05:27:23 -0000 1.2
++++ libc/linuxthreads_db/td_thr_setsigpending.c 28 Dec 2001 16:41:29 -0000 1.3
+@@ -1,5 +1,5 @@
+ /* Raise a signal for a thread.
+- Copyright (C) 1999 Free Software Foundation, Inc.
++ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+@@ -26,6 +26,6 @@
+ const sigset_t *ss)
+ {
+ /* XXX We have to figure out what has to be done. */
+- LOG (__FUNCTION__);
++ LOG ("td_thr_setsigpending");
+ return TD_OK;
+ }
+Index: td_thr_setxregs.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_setxregs.c,v
+retrieving revision 1.2
+retrieving revision 1.3
+diff -u -r1.2 -r1.3
+--- libc/linuxthreads_db/td_thr_setxregs.c 6 Jul 2001 05:27:23 -0000 1.2
++++ libc/linuxthreads_db/td_thr_setxregs.c 28 Dec 2001 16:41:29 -0000 1.3
+@@ -1,5 +1,5 @@
+ /* Set a thread's extra state register set.
+- Copyright (C) 1999 Free Software Foundation, Inc.
++ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+@@ -25,6 +25,6 @@
+ td_thr_setxregs (const td_thrhandle_t *ta, const void *addr)
+ {
+ /* XXX This might have to be platform specific. */
+- LOG (__FUNCTION__);
++ LOG ("td_thr_setxregs");
+ return TD_NOXREGS;
+ }
+Index: td_thr_sigsetmask.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_sigsetmask.c,v
+retrieving revision 1.2
+retrieving revision 1.3
+diff -u -r1.2 -r1.3
+--- libc/linuxthreads_db/td_thr_sigsetmask.c 6 Jul 2001 05:27:23 -0000 1.2
++++ libc/linuxthreads_db/td_thr_sigsetmask.c 28 Dec 2001 16:41:29 -0000 1.3
+@@ -1,5 +1,5 @@
+ /* Set a thread's signal mask.
+- Copyright (C) 1999 Free Software Foundation, Inc.
++ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+@@ -25,6 +25,6 @@
+ td_thr_sigsetmask (const td_thrhandle_t *th, const sigset_t *ss)
+ {
+ /* XXX We have to figure out what has to be done. */
+- LOG (__FUNCTION__);
++ LOG ("td_thr_sigsetmask");
+ return TD_OK;
+ }
+Index: td_thr_tsd.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_tsd.c,v
+retrieving revision 1.2
+retrieving revision 1.3
+diff -u -r1.2 -r1.3
+--- libc/linuxthreads_db/td_thr_tsd.c 6 Jul 2001 05:27:23 -0000 1.2
++++ libc/linuxthreads_db/td_thr_tsd.c 28 Dec 2001 16:41:29 -0000 1.3
+@@ -1,5 +1,5 @@
+ /* Get a thread-specific data pointer for a thread.
+- Copyright (C) 1999 Free Software Foundation, Inc.
++ Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
+
+@@ -33,7 +33,7 @@
+ unsigned int idx2nd;
+ void *p;
+
+- LOG (__FUNCTION__);
++ LOG ("td_thr_tsd");
+
+ /* Get the thread descriptor. */
+ if (ps_pdread (th->th_ta_p->ph, th->th_unique, &pds,
+Index: td_thr_validate.c
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads_db/td_thr_validate.c,v
+retrieving revision 1.4
+retrieving revision 1.5
+diff -u -r1.4 -r1.5
+--- libc/linuxthreads_db/td_thr_validate.c 6 Jul 2001 05:27:23 -0000 1.4
++++ libc/linuxthreads_db/td_thr_validate.c 28 Dec 2001 16:41:29 -0000 1.5
+@@ -28,7 +28,7 @@
+ int pthread_threads_max = th->th_ta_p->pthread_threads_max;
+ int cnt;
+
+- LOG (__FUNCTION__);
++ LOG ("td_thr_validate");
+
+ /* Now get all descriptors, one after the other. */
+ for (cnt = 0; cnt < pthread_threads_max; ++cnt, ++handles)
diff --git a/patches/glibc/linuxthreads-2.2.5/glibc-2.2.5-alpha-self-clobber.patch b/patches/glibc/linuxthreads-2.2.5/glibc-2.2.5-alpha-self-clobber.patch
new file mode 100644
index 0000000..fd34034
--- /dev/null
+++ b/patches/glibc/linuxthreads-2.2.5/glibc-2.2.5-alpha-self-clobber.patch
@@ -0,0 +1,25 @@
+wget http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/linuxthreads/sysdeps/alpha/pt-machine.h.diff?r1=1.9&r2=1.10&cvsroot=glibc
+
+Should fix error
+
+internals.h: In function `pthread_setcancelstate':
+internals.h:381: error: asm-specifier for variable `__self' conflicts with asm clobber list
+make[2]: *** [/home/dank/crosstool-0.28/build/alpha-unknown-linux-gnu/gcc-3.4.1-glibc-2.2.5/build-glibc/linuxthreads/cancel.o] Error 1
+make[2]: Leaving directory `/home/dank/crosstool-0.28/build/alpha-unknown-linux-gnu/gcc-3.4.1-glibc-2.2.5/glibc-2.2.5/linuxthreads'
+
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads/sysdeps/alpha/pt-machine.h,v
+retrieving revision 1.9
+retrieving revision 1.10
+diff -u -r1.9 -r1.10
+--- libc/linuxthreads/sysdeps/alpha/pt-machine.h 2002/04/06 04:05:13 1.9
++++ libc/linuxthreads/sysdeps/alpha/pt-machine.h 2002/05/20 20:09:34 1.10
+@@ -76,7 +76,7 @@
+ #define THREAD_SELF \
+ ({ \
+ register pthread_descr __self __asm__("$0"); \
+- __asm__ ("call_pal %1" : "=r"(__self) : "i"(PAL_rduniq) : "$0"); \
++ __asm__ ("call_pal %1" : "=r"(__self) : "i"(PAL_rduniq)); \
+ __self; \
+ })
+
diff --git a/patches/glibc/linuxthreads-2.2.5/linuxthreads-2.2.5-ppc405erratum77.patch b/patches/glibc/linuxthreads-2.2.5/linuxthreads-2.2.5-ppc405erratum77.patch
new file mode 100644
index 0000000..48127a1
--- /dev/null
+++ b/patches/glibc/linuxthreads-2.2.5/linuxthreads-2.2.5-ppc405erratum77.patch
@@ -0,0 +1,34 @@
+# see http://bugs.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=4155
+# and http://www.kegel.com/xgcc3/ppc405erratum77.html
+# See also matching patch for glibc
+
+diff -aur glibc-2.2.5.orig/linuxthreads/sysdeps/powerpc/pt-machine.h glibc-2.2.5/linuxthreads/sysdeps/powerpc/pt-machine.h
+--- glibc-2.2.5.orig/linuxthreads/sysdeps/powerpc/pt-machine.h Thu May 17 12:47:46 2001
++++ glibc-2.2.5/linuxthreads/sysdeps/powerpc/pt-machine.h Tue Jul 23 05:38:24 2002
+@@ -41,6 +41,17 @@
+ #define HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
+ #define IMPLEMENT_TAS_WITH_CAS
+
++#ifdef __PPC405__
++/* workaround for PPC405 erratum #77 - Mark Hatle, dank. References:
++ http://www-3.ibm.com/chips/techlib/techlib.nsf/techdocs/89DED00DEBFF54BF87256A8000491BA2/$file/405CR_C_errata_1_2.pdf
++ http://ppc.bkbits.net:8080/linuxppc_2_4_devel/cset@1.489
++ http://www.kegel.com/xgcc3/ppc405erratum77.html
++ FIXME: using dbct instead of sync would be faster */
++#define __LINUXTHREADS_PPC405_ERR77_SYNC "sync \n\t"
++#else
++#define __LINUXTHREADS_PPC405_ERR77_SYNC
++#endif
++
+ PT_EI int
+ __compare_and_swap (long int *p, long int oldval, long int newval)
+ {
+@@ -50,6 +61,7 @@
+ "0: lwarx %0,0,%1 ;"
+ " xor. %0,%3,%0;"
+ " bne 1f;"
++ __LINUXTHREADS_PPC405_ERR77_SYNC
+ " stwcx. %2,0,%1;"
+ " bne- 0b;"
+ "1: "
+
diff --git a/patches/glibc/linuxthreads-2.2.5/pt-initfini-alpha.patch b/patches/glibc/linuxthreads-2.2.5/pt-initfini-alpha.patch
new file mode 100644
index 0000000..22a1cfe
--- /dev/null
+++ b/patches/glibc/linuxthreads-2.2.5/pt-initfini-alpha.patch
@@ -0,0 +1,119 @@
+--- glibc-2.2.5/linuxthreads/sysdeps/alpha/elf/pt-initfini.c.old Fri Jun 6 22:02:08 2003
++++ glibc-2.2.5/linuxthreads/sysdeps/alpha/elf/pt-initfini.c Fri Jun 6 22:02:33 2003
+@@ -37,60 +37,60 @@
+ files, all of which may have different GP values. So we must reload
+ the GP value from crti.o in crtn.o. */
+
+-__asm__ ("
+-
+-#include \"defs.h\"
+-
+-/*@HEADER_ENDS*/
+-
+-/*@_init_PROLOG_BEGINS*/
+- .section .init, \"ax\", @progbits
+- .globl _init
+- .ent _init
+-_init:
+- ldgp $29, 0($27)
+- subq $30, 16, $30
+- lda $27, __pthread_initialize_minimal
+- stq $26, 0($30)
+- stq $29, 8($30)
+- .prologue 1
+- jsr $26, ($27), __pthread_initialize_minimal
+- ldq $29, 8($30)
+- .align 3
+- .end _init
+- .size _init, 0
+-/*@_init_PROLOG_ENDS*/
+-
+-/*@_init_EPILOG_BEGINS*/
+- .section .init, \"ax\", @progbits
+- ldq $26, 0($30)
+- ldq $29, 8($30)
+- addq $30, 16, $30
+- ret
+-/*@_init_EPILOG_ENDS*/
+-
+-/*@_fini_PROLOG_BEGINS*/
+- .section .fini, \"ax\", @progbits
+- .globl _fini
+- .ent _fini
+-_fini:
+- ldgp $29, 0($27)
+- subq $30, 16, $30
+- stq $26, 0($30)
+- stq $29, 8($30)
+- .prologue 1
+- .align 3
+- .end _fini
+- .size _fini, 0
+-/*@_fini_PROLOG_ENDS*/
+-
+-/*@_fini_EPILOG_BEGINS*/
+- .section .fini, \"ax\", @progbits
+- ldq $26, 0($30)
+- ldq $29, 8($30)
+- addq $30, 16, $30
+- ret
+-/*@_fini_EPILOG_ENDS*/
+-
+-/*@TRAILER_BEGINS*/
++__asm__ ("\n\
++\n\
++#include \"defs.h\"\n\
++\n\
++/*@HEADER_ENDS*/\n\
++\n\
++/*@_init_PROLOG_BEGINS*/\n\
++ .section .init, \"ax\", @progbits\n\
++ .globl _init\n\
++ .ent _init\n\
++_init:\n\
++ ldgp $29, 0($27)\n\
++ subq $30, 16, $30\n\
++ lda $27, __pthread_initialize_minimal\n\
++ stq $26, 0($30)\n\
++ stq $29, 8($30)\n\
++ .prologue 1\n\
++ jsr $26, ($27), __pthread_initialize_minimal\n\
++ ldq $29, 8($30)\n\
++ .align 3\n\
++ .end _init\n\
++ .size _init, 0\n\
++/*@_init_PROLOG_ENDS*/\n\
++\n\
++/*@_init_EPILOG_BEGINS*/\n\
++ .section .init, \"ax\", @progbits\n\
++ ldq $26, 0($30)\n\
++ ldq $29, 8($30)\n\
++ addq $30, 16, $30\n\
++ ret\n\
++/*@_init_EPILOG_ENDS*/\n\
++\n\
++/*@_fini_PROLOG_BEGINS*/\n\
++ .section .fini, \"ax\", @progbits\n\
++ .globl _fini\n\
++ .ent _fini\n\
++_fini:\n\
++ ldgp $29, 0($27)\n\
++ subq $30, 16, $30\n\
++ stq $26, 0($30)\n\
++ stq $29, 8($30)\n\
++ .prologue 1\n\
++ .align 3\n\
++ .end _fini\n\
++ .size _fini, 0\n\
++/*@_fini_PROLOG_ENDS*/\n\
++\n\
++/*@_fini_EPILOG_BEGINS*/\n\
++ .section .fini, \"ax\", @progbits\n\
++ ldq $26, 0($30)\n\
++ ldq $29, 8($30)\n\
++ addq $30, 16, $30\n\
++ ret\n\
++/*@_fini_EPILOG_ENDS*/\n\
++\n\
++/*@TRAILER_BEGINS*/\n\
+ ");
diff --git a/patches/glibc/linuxthreads-2.2.5/pt-initfini-sh.patch b/patches/glibc/linuxthreads-2.2.5/pt-initfini-sh.patch
new file mode 100644
index 0000000..8c9cdb8
--- /dev/null
+++ b/patches/glibc/linuxthreads-2.2.5/pt-initfini-sh.patch
@@ -0,0 +1,267 @@
+--- glibc-2.2.5/linuxthreads/sysdeps/unix/sysv/linux/sh/pt-initfini.c.old Wed May 28 09:29:55 2003
++++ glibc-2.2.5/linuxthreads/sysdeps/unix/sysv/linux/sh/pt-initfini.c Wed May 28 09:30:11 2003
+@@ -36,134 +36,134 @@
+ * crtn.s puts the corresponding function epilogues
+ in the .init and .fini sections. */
+
+-__asm__ ("
+-
+-#include \"defs.h\"
+-#define SHARED
+-
+-/*@HEADER_ENDS*/
+-
+-/*@TESTS_BEGIN*/
+-
+-/*@TESTS_END*/
+-
+-/*@_init_PROLOG_BEGINS*/
+- .section .init
+- .align 5
+- .global _init
+- .type _init,@function
+-_init:
+- mov.l r12,@-r15
+- mov.l r14,@-r15
+- sts.l pr,@-r15
+-#ifdef SHARED
+- mova .L22,r0
+- mov.l .L22,r12
+- add r0,r12
+- mova .L24,r0
+- mov.l .L24,r1
+- add r0,r1
+- jsr @r1
+- nop
+- mova .L23,r0
+- mov.l .L23,r1
+- add r0,r1
+-#else
+- mov.l .L24,r1
+- jsr @r1
+- nop
+- mov.l .L23,r1
+-#endif
+- jsr @r1
+- mov r15,r14
+- bra 1f
+- nop
+- .align 2
+-#ifdef SHARED
+-.L22:
+- .long _GLOBAL_OFFSET_TABLE_
+-.L23:
+- .long __gmon_start__@PLT
+-.L24:
+- .long __pthread_initialize_minimal@PLT
+-#else
+-.L23:
+- .long __gmon_start__
+-.L24:
+- .long __pthread_initialize_minimal
+-#endif
+- .data
+- .global __fpscr_values
+-__fpscr_values:
+- .long 0
+- .long 0x80000
+- .previous
+-1:
+- ALIGN
+- END_INIT
+-
+-
+-/*@_init_PROLOG_ENDS*/
+-
+-/*@_init_EPILOG_BEGINS*/
+- .section .init
+- mov r14,r15
+- lds.l @r15+,pr
+- mov.l @r15+,r14
+- rts
+- mov.l @r15+,r12
+- END_INIT
+- .section .text
+- .align 5
+- .weak __gmon_start__
+- .type __gmon_start__,@function
+-__gmon_start__:
+- mov.l r14,@-r15
+- mov r15,r14
+- mov r14,r15
+- rts
+- mov.l @r15+,r14
+-
+-/*@_init_EPILOG_ENDS*/
+-
+-/*@_fini_PROLOG_BEGINS*/
+- .section .fini
+- .align 5
+- .global _fini
+- .type _fini,@function
+-_fini:
+- mov.l r12,@-r15
+- mov.l r14,@-r15
+- sts.l pr,@-r15
+-#ifdef SHARED
+- mova .L27,r0
+- mov.l .L27,r12
+- add r0,r12
+-#endif
+- mov r15,r14
+- ALIGN
+- END_FINI
+-#ifdef SHARED
+- bra 1f
+- nop
+- .align 2
+-.L27:
+- .long _GLOBAL_OFFSET_TABLE_
+-#endif
+-1:
+-/*@_fini_PROLOG_ENDS*/
+-
+-/*@_fini_EPILOG_BEGINS*/
+- .section .fini
+- mov r14,r15
+- lds.l @r15+,pr
+- mov.l @r15+,r14
+- rts
+- mov.l @r15+,r12
+-
+- END_FINI
+-
+-/*@_fini_EPILOG_ENDS*/
+-
+-/*@TRAILER_BEGINS*/
++__asm__ ("\n\
++\n\
++#include \"defs.h\"\n\
++#define SHARED\n\
++\n\
++/*@HEADER_ENDS*/\n\
++\n\
++/*@TESTS_BEGIN*/\n\
++\n\
++/*@TESTS_END*/\n\
++\n\
++/*@_init_PROLOG_BEGINS*/\n\
++ .section .init\n\
++ .align 5\n\
++ .global _init\n\
++ .type _init,@function\n\
++_init:\n\
++ mov.l r12,@-r15\n\
++ mov.l r14,@-r15\n\
++ sts.l pr,@-r15\n\
++#ifdef SHARED\n\
++ mova .L22,r0\n\
++ mov.l .L22,r12\n\
++ add r0,r12\n\
++ mova .L24,r0\n\
++ mov.l .L24,r1\n\
++ add r0,r1\n\
++ jsr @r1\n\
++ nop\n\
++ mova .L23,r0\n\
++ mov.l .L23,r1\n\
++ add r0,r1\n\
++#else\n\
++ mov.l .L24,r1\n\
++ jsr @r1\n\
++ nop\n\
++ mov.l .L23,r1\n\
++#endif\n\
++ jsr @r1\n\
++ mov r15,r14\n\
++ bra 1f\n\
++ nop\n\
++ .align 2\n\
++#ifdef SHARED\n\
++.L22:\n\
++ .long _GLOBAL_OFFSET_TABLE_\n\
++.L23:\n\
++ .long __gmon_start__@PLT\n\
++.L24:\n\
++ .long __pthread_initialize_minimal@PLT\n\
++#else\n\
++.L23:\n\
++ .long __gmon_start__\n\
++.L24:\n\
++ .long __pthread_initialize_minimal\n\
++#endif\n\
++ .data\n\
++ .global __fpscr_values\n\
++__fpscr_values:\n\
++ .long 0\n\
++ .long 0x80000\n\
++ .previous\n\
++1:\n\
++ ALIGN\n\
++ END_INIT\n\
++\n\
++ \n\
++/*@_init_PROLOG_ENDS*/\n\
++\n\
++/*@_init_EPILOG_BEGINS*/\n\
++ .section .init\n\
++ mov r14,r15\n\
++ lds.l @r15+,pr\n\
++ mov.l @r15+,r14\n\
++ rts \n\
++ mov.l @r15+,r12\n\
++ END_INIT\n\
++ .section .text\n\
++ .align 5\n\
++ .weak __gmon_start__\n\
++ .type __gmon_start__,@function\n\
++__gmon_start__:\n\
++ mov.l r14,@-r15\n\
++ mov r15,r14\n\
++ mov r14,r15\n\
++ rts \n\
++ mov.l @r15+,r14\n\
++ \n\
++/*@_init_EPILOG_ENDS*/\n\
++\n\
++/*@_fini_PROLOG_BEGINS*/\n\
++ .section .fini\n\
++ .align 5\n\
++ .global _fini\n\
++ .type _fini,@function\n\
++_fini:\n\
++ mov.l r12,@-r15\n\
++ mov.l r14,@-r15\n\
++ sts.l pr,@-r15\n\
++#ifdef SHARED\n\
++ mova .L27,r0\n\
++ mov.l .L27,r12\n\
++ add r0,r12\n\
++#endif\n\
++ mov r15,r14\n\
++ ALIGN\n\
++ END_FINI\n\
++#ifdef SHARED\n\
++ bra 1f\n\
++ nop\n\
++ .align 2\n\
++.L27:\n\
++ .long _GLOBAL_OFFSET_TABLE_\n\
++#endif\n\
++1:\n\
++/*@_fini_PROLOG_ENDS*/\n\
++\n\
++/*@_fini_EPILOG_BEGINS*/\n\
++ .section .fini\n\
++ mov r14,r15\n\
++ lds.l @r15+,pr\n\
++ mov.l @r15+,r14\n\
++ rts \n\
++ mov.l @r15+,r12\n\
++\n\
++ END_FINI\n\
++ \n\
++/*@_fini_EPILOG_ENDS*/\n\
++\n\
++/*@TRAILER_BEGINS*/\n\
+ ");
diff --git a/patches/glibc/linuxthreads-2.2.5/threadparam.patch b/patches/glibc/linuxthreads-2.2.5/threadparam.patch
new file mode 100644
index 0000000..dd97838
--- /dev/null
+++ b/patches/glibc/linuxthreads-2.2.5/threadparam.patch
@@ -0,0 +1,69 @@
+2002-05-21 Ulrich Drepper <drepper@redhat.com>
+
+ * sysdeps/pthread/pthread.h (pthread_create): Rename first parameter.
+ (pthread_cancel): Likewise.
+ * internals.h (__pthread_create_2_1): Likewise.
+ * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads/internals.h,v
+retrieving revision 1.69.2.2
+retrieving revision 1.69.2.3
+diff -u -r1.69.2.2 -r1.69.2.3
+--- libc/linuxthreads/internals.h 2002/03/22 08:30:32 1.69.2.2
++++ libc/linuxthreads/internals.h 2002/08/20 22:01:25 1.69.2.3
+@@ -554,7 +554,7 @@
+ /* Prototypes for compatibility functions. */
+ extern int __pthread_attr_init_2_1 (pthread_attr_t *__attr);
+ extern int __pthread_attr_init_2_0 (pthread_attr_t *__attr);
+-extern int __pthread_create_2_1 (pthread_t *__restrict __thread,
++extern int __pthread_create_2_1 (pthread_t *__restrict __threadp,
+ const pthread_attr_t *__attr,
+ void *(*__start_routine) (void *),
+ void *__restrict __arg);
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads/sysdeps/pthread/pthread.h,v
+retrieving revision 1.31
+retrieving revision 1.31.2.1
+diff -u -r1.31 -r1.31.2.1
+--- libc/linuxthreads/sysdeps/pthread/pthread.h 2001/03/15 21:12:31 1.31
++++ libc/linuxthreads/sysdeps/pthread/pthread.h 2002/08/20 22:01:26 1.31.2.1
+@@ -160,7 +160,7 @@
+ /* Create a thread with given attributes ATTR (or default attributes
+ if ATTR is NULL), and call function START_ROUTINE with given
+ arguments ARG. */
+-extern int pthread_create (pthread_t *__restrict __thread,
++extern int pthread_create (pthread_t *__restrict __threadp,
+ __const pthread_attr_t *__restrict __attr,
+ void *(*__start_routine) (void *),
+ void *__restrict __arg) __THROW;
+@@ -588,7 +588,7 @@
+ extern int pthread_setcanceltype (int __type, int *__oldtype) __THROW;
+
+ /* Cancel THREAD immediately or at the next possibility. */
+-extern int pthread_cancel (pthread_t __thread) __THROW;
++extern int pthread_cancel (pthread_t __cancelthread) __THROW;
+
+ /* Test for pending cancellation for the current thread and terminate
+ the thread as per pthread_exit(PTHREAD_CANCELED) if it has been
+===================================================================
+RCS file: /cvs/glibc/libc/linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h,v
+retrieving revision 1.5
+retrieving revision 1.5.2.1
+diff -u -r1.5 -r1.5.2.1
+--- libc/linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h 2000/08/21 06:48:03 1.5
++++ libc/linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h 2002/08/20 22:01:26 1.5.2.1
+@@ -1,5 +1,5 @@
+ /* Signal handling function for threaded programs.
+- Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
++ Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+@@ -33,6 +33,6 @@
+ __sigset_t *__restrict __oldmask)__THROW;
+
+ /* Send signal SIGNO to the given thread. */
+-extern int pthread_kill (pthread_t __thread, int __signo) __THROW;
++extern int pthread_kill (pthread_t __threadid, int __signo) __THROW;
+
+ #endif /* bits/sigthread.h */