Skip to contentSkip to conversation

MIPS64 NPTL Status

DISCUSSION Jim Gifford 4 participants 8 messages Sep 22, 2005 – Sep 27, 2005 MIPS

lore
Share & tools
lore
#0 lore raw

Looking through the latest glibc snapshot they have removed linuxthreads and moved it to ports. I know Daniel has been working on getting NPTL to work on MIPS32, which it does. Thank you Daniel. I know from emails I read around linux-mips.org he was going to work on MIPS64 NPTL, just curious to the status.

For the record the current glibc snapshot will not build at all under MIPS64. Here is the error message I have received, still working on getting it to build properly

In file included from ../sysdeps/mips/libc-tls.c:20:
../sysdeps/generic/libc-tls.c: In function '__libc_setup_tls':
../sysdeps/generic/libc-tls.c:191: warning: implicit declaration of function 'INTERNAL_SYSCALL_DECL' ../sysdeps/generic/libc-tls.c:191: error: 'err' undeclared (first use in this function) ../sysdeps/generic/libc-tls.c:191: error: (Each undeclared identifier is reported only once ../sysdeps/generic/libc-tls.c:191: error: for each function it appears in.) ../sysdeps/generic/libc-tls.c:191: warning: implicit declaration of function 'INTERNAL_SYSCALL' ../sysdeps/generic/libc-tls.c:191: error: 'set_thread_area' undeclared (first use in this function) ../sysdeps/generic/libc-tls.c:191: warning: implicit declaration of function 'INTERNAL_SYSCALL_ERROR_P' make[2]: *** [/mnt/lfs-mips64/build/glibc-cross-64bit/csu/libc-tls.o] Error 1
make[2]: Leaving directory `/mnt/lfs-mips64/build/glibc-20050919/csu'

Signature · 3 lines
----
Jim Gifford
[email protected]
#1 lore raw
Quoted 1 line · Jim Gifford

Looking through the latest glibc snapshot they have removed linuxthreads and moved it to ports. I know Daniel has been working on getting NPTL to work on MIPS32, which it does. Thank you Daniel. I know from emails I read around linux-mips.org he was going to work on MIPS64 NPTL, just curious to the status.

Out of curiosity, is anyone working on using the Multi-Threading ASE to support NTPL?

Signature · 1 line
John Connett
#2 lore raw

If course. But we haven't announced schedules yet.

/gmu
---
Michael Uhler, Chief Technology Officer
MIPS Technologies, Inc. Email: uhler at mips dot com
1225 Charleston Road Voice: (650)567-5025
Mountain View, CA 94043

Quoted 23 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of John Connett
Sent: Thursday, September 22, 2005 1:38 PM
To: Linux MIPS List
Cc: Jim Gifford
Subject: Re: MIPS64 NPTL Status

Quoted 2 lines · Jim Gifford

Looking through the latest glibc snapshot they have removed linuxthreads and moved it to ports. I know Daniel has been

working on

Quoted 2 lines

getting NPTL to work on MIPS32, which it does. Thank you Daniel. I know from emails I read around linux-mips.org he was going

to work on

Quoted 1 line

MIPS64 NPTL, just curious to the status.

Out of curiosity, is anyone working on using the
Multi-Threading ASE to support NTPL?

Signature · 1 line
John Connett
#3 lore raw
In reply to Jim Gifford
Quoted 9 lines · Jim Gifford

Looking through the latest glibc snapshot they have removed linuxthreads and moved it to ports. I know Daniel has been working on getting NPTL to work on MIPS32, which it does. Thank you Daniel. I know from emails I read around linux-mips.org he was going to work on MIPS64 NPTL, just curious to the status.

For the record the current glibc snapshot will not build at all under MIPS64. Here is the error message I have received, still working on getting it to build properly

Hi Jim,

I've got complete patches to do this. I thought I'd already submitted them, but I found out yesterday morning that I hadn't... simply an accident. I've posted my complete set of glibc patches here:

http://return.false.org/~drow/mips/glibc-2005-09-22-HEAD-MIPS64-NPTL.tar.gz

As of this morning, they work for me, using GCC HEAD and binutils HEAD. Rather more work is required for GDB (see my earlier post today and the last patch in the above tarball).

There are some test failures. IIRC, at least one of them is a GCC unwinder bug that I haven't dug out the fix for yet from my archives. I'm going to try to get all of this merged soon.

Signature · 2 lines
Daniel Jacobowitz
CodeSourcery, LLC
#4 lore raw

Daniel,
He I still keeping getting this error with the currently 9192005
snapshot of glibc.

In file included from ../sysdeps/mips/libc-tls.c:20:
../sysdeps/generic/libc-tls.c: In function '__libc_setup_tls':
../sysdeps/generic/libc-tls.c:191: warning: implicit declaration of function 'INTERNAL_SYSCALL_DECL' ../sysdeps/generic/libc-tls.c:191: error: 'err' undeclared (first use in this function) ../sysdeps/generic/libc-tls.c:191: error: (Each undeclared identifier is reported only once ../sysdeps/generic/libc-tls.c:191: error: for each function it appears in.) ../sysdeps/generic/libc-tls.c:191: warning: implicit declaration of function 'INTERNAL_SYSCALL' ../sysdeps/generic/libc-tls.c:191: error: 'set_thread_area' undeclared (first use in this function) ../sysdeps/generic/libc-tls.c:191: warning: implicit declaration of function 'INTERNAL_SYSCALL_ERROR_P' make[2]: *** [/mnt/lfs-mips64/build/glibc-cross-64bit/csu/libc-tls.o] Error 1

Signature · 3 lines
----
Jim Gifford
[email protected]
#5 lore raw
Quoted 8 lines · Jim Gifford

Daniel,
He I still keeping getting this error with the currently 9192005
snapshot of glibc.

In file included from ../sysdeps/mips/libc-tls.c:20:
../sysdeps/generic/libc-tls.c: In function '__libc_setup_tls':
../sysdeps/generic/libc-tls.c:191: warning: implicit declaration of function 'INTERNAL_SYSCALL_DECL'

You'll need to provide more context, then, since I don't. I built those patches this morning.

Signature · 2 lines
Daniel Jacobowitz
CodeSourcery, LLC
#6 lore raw
In reply to Jim Gifford

Daniel,
Got passed the first issue, but the second one came around when
trying to get NPTL to compile with N32. Here's what I got. The code does compile under pure 64 bit no problems.

mips64el-unknown-linux-gnu-gcc -mel -march=r5000 -mtune=r5000 -mabi=n32 ../sysdeps/unix/sysv/linux/ptrace.c -c -std=gnu99 -O2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -g -I../include -I. -I/mnt/lfs-mips64/build/glibc-cross-n32/misc -I.. -I../libio -I../nptl -I/mnt/lfs-mips64/build/glibc-cross-n32 -I../sysdeps/mips/elf -I../libidn/sysdeps/unix -I../nptl/sysdeps/unix/sysv/linux/mips/mips64 -I../nptl/sysdeps/unix/sysv/linux/mips -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../nptl/sysdeps/unix/sysv -I../nptl/sysdeps/unix -I../nptl/sysdeps/mips -I../nptl/sysdeps/generic -I../sysdeps/unix/sysv/linux/mips/mips64/n32 -I../sysdeps/unix/sysv/linux/mips/mips64 -I../sysdeps/unix/sysv/linux/mips -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/mips/mips64/n32 -I../sysdeps/unix/mips/mips64 -I../sysdeps/unix/mips -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/mips/mips64/n32 -I../sysdeps/ieee754/ldbl-128 -I../sysdeps/mips/mips64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/mips -I../sysdeps/wordsize-32 -I../sysdeps/mips/fpu -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -nostdinc -isystem /home/lfs-mips64/cross-tools/bin/../lib/gcc/mips64el-unknown-linux-gnu/4.0.1/include -isystem /tools/include -D_LIBC_REENTRANT -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DPIC -o /mnt/lfs-mips64/build/glibc-cross-n32/misc/ptrace.o -MD -MP -MF /mnt/lfs-mips64/build/glibc-cross-n32/misc/ptrace.o.dt -MT /mnt/lfs-mips64/build/glibc-cross-n32/misc/ptrace.o
../sysdeps/unix/sysv/linux/ptrace.c:31: error: conflicting types for 'ptrace' ../sysdeps/unix/sysv/linux/mips/sys/ptrace.h:129: error: previous declaration of 'ptrace' was here ../sysdeps/unix/sysv/linux/ptrace.c: In function 'ptrace':
../sysdeps/unix/sysv/linux/ptrace.c:104: warning: cast from pointer to integer of different size ../sysdeps/unix/sysv/linux/ptrace.c:104: warning: cast from pointer to integer of different size make[2]: *** [/mnt/lfs-mips64/build/glibc-cross-n32/misc/ptrace.o] Error 1 make[2]: Leaving directory `/mnt/lfs-mips64/build/glibc-20050919/misc'
make[1]: *** [misc/subdir_lib] Error 2
make[1]: Leaving directory `/mnt/lfs-mips64/build/glibc-20050919'
make: *** [all] Error 2

Line 127 - ptrace.h
#if _MIPS_SIM == _ABIN32
__extension__ extern long long int ptrace
(enum __ptrace_request __request, ...) __THROW;
#else
extern long int ptrace (enum __ptrace_request __request, ...) __THROW; #endif

Line 31 - ptrace.c

long int
ptrace (enum __ptrace_request request, ...)
{
long int res, ret;

Signature · 3 lines
----
Jim Gifford
[email protected]
#7 lore raw
Quoted 4 lines · Jim Gifford

Daniel,
Got passed the first issue, but the second one came around when
trying to get NPTL to compile with N32. Here's what I got. The code does compile under pure 64 bit no problems.

I must have sent you an outdated patch. Remove the mips-specific sys/ptrace.h header and use the generic one.

Signature · 2 lines
Daniel Jacobowitz
CodeSourcery, LLC