Subject: MIPS64 NPTL Status

From: Jim Gifford <[email-masked]>
Date: Wed, 21 Sep 2005 22:12:21 -0700

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'

-- 
----
Jim Gifford
[email-masked]

---

From: John Connett <[email-masked]>
Date: Thu, 22 Sep 2005 21:38:25 +0100

Jim Gifford wrote:
> 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?
-- 
John Connett

---

From: "Michael Uhler" <[email-masked]>
Date: Thu, 22 Sep 2005 13:44:45 -0700

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

> -----Original Message-----
> From: [email-masked] 
> [mailto:[email-masked]] 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
> 
> 
> Jim Gifford wrote:
> Out of curiosity, is anyone working on using the 
> Multi-Threading ASE to support NTPL?
> -- 
> John Connett
> 
>

---

From: Daniel Jacobowitz <[email-masked]>
Date: Thu, 22 Sep 2005 17:30:20 -0400

> 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.

-- 
Daniel Jacobowitz
CodeSourcery, LLC

---

From: Jim Gifford <[email-masked]>
Date: Thu, 22 Sep 2005 15:28:17 -0700

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

-- 
----
Jim Gifford
[email-masked]

---

From: Daniel Jacobowitz <[email-masked]>
Date: Thu, 22 Sep 2005 18:30:52 -0400

> function 'INTERNAL_SYSCALL_DECL'

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

-- 
Daniel Jacobowitz
CodeSourcery, LLC

---

From: Jim Gifford <[email-masked]>
Date: Mon, 26 Sep 2005 08:17:48 -0700

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.

../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;

-- 
----
Jim Gifford
[email-masked]

---

From: Daniel Jacobowitz <[email-masked]>
Date: Tue, 27 Sep 2005 09:09:51 -0400

> 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.

-- 
Daniel Jacobowitz
CodeSourcery, LLC