This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Am 03.08.2005 23:30, Paul Bilke wrote: > Using crosstool-0.37 I have been trying to build a PPC-604 with NPTL > target on x86 host. Multiple configurations fail with the same error but > the included info is for > gcc-4.0.0 and glibc-2.3.5 > > It fails building the GLIB trying to create tcb-offsets.h > > It is trying to build the following from STDIN: > > #include <sysdep.h> > #include <tls.h> > void dummy(void) { > # undef __thread_register > # define __thread_register ((void *) 0) > # define thread_offsetof(mem) ((void *) &THREAD_SELF->mem - (void *) 0) > #if TLS_MULTIPLE_THREADS_IN_TCB > asm ("@@@name@@@MULTIPLE_THREADS_OFFSET@@@value@@@%0@@@end@@@" : : "i" > (thread_offsetof (header.multiple_threads))); > #endif > asm ("@@@name@@@PID@@@value@@@%0@@@end@@@" : : "i" (thread_offsetof (pid))); > asm ("@@@name@@@TID@@@value@@@%0@@@end@@@" : : "i" (thread_offsetof (tid))); > } > > There seems to be issues on several arch's building this but I have yet > to find any resolution to this issue. > > Any help would be appreciated! You can try the following patch: --- libc/nptl/sysdeps/powerpc/tcb-offsets.sym 2004/12/15 06:07:00 1.5 +++ libc/nptl/sysdeps/powerpc/tcb-offsets.sym 2005/02/14 22:44:12 1.6 @@ -6,7 +6,8 @@ -- Abuse tls.h macros to derive offsets relative to the thread register. # undef __thread_register # define __thread_register ((void *) 0) -# define thread_offsetof(mem) ((void *) &THREAD_SELF->mem - (void *) 0) +# define thread_offsetof(mem) ((ptrdiff_t) THREAD_SELF + offsetof (struct pthread, mem)) + #if TLS_MULTIPLE_THREADS_IN_TCB MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads) Best regards, Peter ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |