r2422 - glibc-package/trunk/debian/patches/hurd-i386
Author: sthibaul-guest
Date: 2007-07-19 23:09:30 +0000 (Thu, 19 Jul 2007)
New Revision: 2422
Modified:
glibc-package/trunk/debian/patches/hurd-i386/local-tls-support.diff
Log:
oops, that was an old patch
Modified: glibc-package/trunk/debian/patches/hurd-i386/local-tls-support.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/local-tls-support.diff 2007-07-19 21:34:55 UTC (rev 2421)
+++ glibc-package/trunk/debian/patches/hurd-i386/local-tls-support.diff 2007-07-19 23:09:30 UTC (rev 2422)
@@ -4,7 +4,7 @@
retrieving revision 1.3
diff -u -p -r1.3 libc-start.c
--- csu/libc-start.c 17 Jan 2007 08:36:51 -0000 1.3
-+++ csu/libc-start.c 19 Jul 2007 21:27:42 -0000
++++ csu/libc-start.c 19 Jul 2007 22:37:08 -0000
@@ -134,11 +134,13 @@ LIBC_START_MAIN (int (*main) (int, char
}
# endif
@@ -25,13 +25,13 @@
retrieving revision 1.21
diff -u -p -r1.21 hurdfault.c
--- hurd/hurdfault.c 21 Dec 2005 22:16:20 -0000 1.21
-+++ hurd/hurdfault.c 19 Jul 2007 21:27:42 -0000
++++ hurd/hurdfault.c 19 Jul 2007 22:37:08 -0000
@@ -206,6 +206,8 @@ _hurdsig_fault_init (void)
/* This state will be restored when we fault.
It runs the function above. */
memset (&state, 0, sizeof state);
+
-+ MACHINE_THREAD_STATE_SET_SEGMENTS (&state);
++ MACHINE_THREAD_STATE_FIX_NEW (&state);
MACHINE_THREAD_STATE_SET_PC (&state, faulted);
MACHINE_THREAD_STATE_SET_SP (&state, faultstack, sizeof faultstack);
@@ -41,7 +41,7 @@
retrieving revision 1.19
diff -u -p -r1.19 setup-thread.c
--- mach/setup-thread.c 22 Dec 2005 11:31:24 -0000 1.19
-+++ mach/setup-thread.c 19 Jul 2007 21:27:43 -0000
++++ mach/setup-thread.c 19 Jul 2007 22:37:08 -0000
@@ -20,6 +20,7 @@
#include <thread_state.h>
#include <string.h>
@@ -83,7 +83,7 @@
retrieving revision 1.2
diff -u -p -r1.2 thread_state.h
--- sysdeps/generic/thread_state.h 6 Jul 2001 04:55:50 -0000 1.2
-+++ sysdeps/generic/thread_state.h 19 Jul 2007 21:27:43 -0000
++++ sysdeps/generic/thread_state.h 19 Jul 2007 22:37:09 -0000
@@ -23,6 +23,7 @@
/* Replace <machine> with "i386" or "mips" or whatever. */
@@ -98,13 +98,13 @@
retrieving revision 1.13
diff -u -p -r1.13 thread_state.h
--- sysdeps/mach/thread_state.h 6 Jul 2001 04:55:56 -0000 1.13
-+++ sysdeps/mach/thread_state.h 19 Jul 2007 21:27:43 -0000
++++ sysdeps/mach/thread_state.h 19 Jul 2007 22:37:09 -0000
@@ -38,6 +38,9 @@
((ts)->SP = (unsigned long int) (stack) + (size))
#endif
#endif
-+#ifndef MACHINE_THREAD_STATE_SET_SEGMENTS(ts)
-+#define MACHINE_THREAD_STATE_SET_SEGMENTS(ts)
++#ifndef MACHINE_THREAD_STATE_FIX_NEW
++#define MACHINE_THREAD_STATE_FIX_NEW(ts)
+#endif
/* These functions are of use in machine-dependent signal trampoline
@@ -115,7 +115,7 @@
retrieving revision 1.5
diff -u -p -r1.5 thread_state.h
--- sysdeps/mach/alpha/thread_state.h 6 Jul 2001 04:55:56 -0000 1.5
-+++ sysdeps/mach/alpha/thread_state.h 19 Jul 2007 21:27:43 -0000
++++ sysdeps/mach/alpha/thread_state.h 19 Jul 2007 22:37:09 -0000
@@ -19,6 +19,7 @@
#include <mach/machine/thread_status.h>
@@ -130,41 +130,35 @@
retrieving revision 1.58
diff -u -p -r1.58 fork.c
--- sysdeps/mach/hurd/fork.c 27 Oct 2006 23:11:46 -0000 1.58
-+++ sysdeps/mach/hurd/fork.c 19 Jul 2007 21:27:44 -0000
-@@ -523,6 +523,13 @@ __fork (void)
++++ sysdeps/mach/hurd/fork.c 19 Jul 2007 22:37:09 -0000
+@@ -523,6 +523,11 @@ __fork (void)
#endif
MACHINE_THREAD_STATE_SET_PC (&state,
(unsigned long int) _hurd_msgport_receive);
+
-+#if USE_TLS
+ /* Do special thread setup for TLS if needed. */
+ if (err = _hurd_tls_fork (sigthread, _hurd_msgport_thread, &state))
+ LOSE;
-+#endif
+
if (err = __thread_set_state (sigthread, MACHINE_THREAD_STATE_FLAVOR,
(natural_t *) &state, statecount))
LOSE;
-@@ -532,9 +539,11 @@ __fork (void)
- /* Set the child user thread up to return 1 from the setjmp above. */
+@@ -533,7 +538,7 @@ __fork (void)
_hurd_longjmp_thread_state (&state, env, 1);
-+#if USE_TLS
/* Do special thread setup for TLS if needed. */
- if (err = _hurd_tls_fork (thread, &state))
+ if (err = _hurd_tls_fork (thread, __mach_thread_self (), &state))
LOSE;
-+#endif
if (err = __thread_set_state (thread, MACHINE_THREAD_STATE_FLAVOR,
- (natural_t *) &state, statecount))
Index: sysdeps/mach/hurd/i386/init-first.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/mach/hurd/i386/init-first.c,v
retrieving revision 1.44
diff -u -p -r1.44 init-first.c
--- sysdeps/mach/hurd/i386/init-first.c 16 Oct 2005 09:52:58 -0000 1.44
-+++ sysdeps/mach/hurd/i386/init-first.c 19 Jul 2007 21:27:44 -0000
++++ sysdeps/mach/hurd/i386/init-first.c 19 Jul 2007 22:37:09 -0000
@@ -104,10 +104,6 @@ init1 (int argc, char *arg0, ...)
char **argv = &arg0;
char **envp = &argv[argc + 1];
@@ -215,7 +209,7 @@
/* Provide temporary storage for thread-specific variables on the
startup stack so the cthreads initialization code can use them
-@@ -192,6 +174,46 @@ init (int *data)
+@@ -192,6 +174,39 @@ init (int *data)
++envp;
d = (void *) ++envp;
@@ -247,16 +241,9 @@
+ }
+
+#ifndef SHARED
-+ extern void __pthread_initialize_minimal(void)
-+#if !(USE_TLS - 0)
-+ __attribute__((weak))
-+#endif
-+ ;
-+#if !(USE_TLS - 0)
-+ if (__pthread_initialize_minimal())
-+#endif
+ /* We need to setup TLS before starting sigthread */
-+ __pthread_initialize_minimal();
++ extern void __pthread_initialize_minimal(void);
++ __pthread_initialize_minimal();
+#endif
+
/* The user might have defined a value for this, to get more variables.
@@ -268,7 +255,7 @@
retrieving revision 1.12
diff -u -p -r1.12 tls.h
--- sysdeps/mach/hurd/i386/tls.h 27 Oct 2006 23:11:46 -0000 1.12
-+++ sysdeps/mach/hurd/i386/tls.h 19 Jul 2007 21:27:44 -0000
++++ sysdeps/mach/hurd/i386/tls.h 19 Jul 2007 22:37:09 -0000
@@ -96,7 +96,7 @@ _hurd_tls_init (tcbhead_t *tcb, int seco
/* Fetch the selector set by the first call. */
int sel;
@@ -343,7 +330,7 @@
retrieving revision 1.30
diff -u -p -r1.30 trampoline.c
--- sysdeps/mach/hurd/i386/trampoline.c 21 Dec 2005 22:16:20 -0000 1.30
-+++ sysdeps/mach/hurd/i386/trampoline.c 19 Jul 2007 21:27:44 -0000
++++ sysdeps/mach/hurd/i386/trampoline.c 19 Jul 2007 22:37:09 -0000
@@ -64,7 +64,7 @@ _hurd_setup_sighandler (struct hurd_sigs
sizeof (state->basic));
memcpy (&state->fpu, &ss->context->sc_i386_float_state,
@@ -359,7 +346,7 @@
retrieving revision 1.14
diff -u -p -r1.14 thread_state.h
--- sysdeps/mach/i386/thread_state.h 6 Jul 2001 04:56:00 -0000 1.14
-+++ sysdeps/mach/i386/thread_state.h 19 Jul 2007 21:27:44 -0000
++++ sysdeps/mach/i386/thread_state.h 19 Jul 2007 22:37:09 -0000
@@ -19,7 +19,8 @@
#include <mach/machine/thread_status.h>
@@ -374,13 +361,13 @@
#define SP uesp
#define SYSRETURN eax
-+#define MACHINE_THREAD_STATE_SET_SEGMENTS(ts) do { \
-+ asm ("mov %%cs, %w0" : "=q" (ts->cs)); \
-+ asm ("mov %%ds, %w0" : "=q" (ts->ds)); \
-+ asm ("mov %%es, %w0" : "=q" (ts->es)); \
-+ asm ("mov %%fs, %w0" : "=q" (ts->fs)); \
-+ asm ("mov %%gs, %w0" : "=q" (ts->gs)); \
-+while(0)
++#define MACHINE_THREAD_STATE_FIX_NEW(ts) do { \
++ asm ("mov %%cs, %w0" : "=q" ((ts)->cs)); \
++ asm ("mov %%ds, %w0" : "=q" ((ts)->ds)); \
++ asm ("mov %%es, %w0" : "=q" ((ts)->es)); \
++ asm ("mov %%fs, %w0" : "=q" ((ts)->fs)); \
++ asm ("mov %%gs, %w0" : "=q" ((ts)->gs)); \
++} while(0)
+
struct machine_thread_all_state
{
@@ -391,7 +378,7 @@
retrieving revision 1.2
diff -u -p -r1.2 thread_state.h
--- sysdeps/mach/powerpc/thread_state.h 26 Aug 2002 22:39:44 -0000 1.2
-+++ sysdeps/mach/powerpc/thread_state.h 19 Jul 2007 21:27:44 -0000
++++ sysdeps/mach/powerpc/thread_state.h 19 Jul 2007 22:37:09 -0000
@@ -19,6 +19,7 @@
#include <mach/machine/thread_status.h>
Reply to: