All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Daney <ddaney@avtrex.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: MIPS Linux List <linux-mips@linux-mips.org>
Subject: Re: glibc 2.3.3 patches for mips?
Date: Wed, 06 Oct 2004 16:53:34 -0700	[thread overview]
Message-ID: <4164857E.3000601@avtrex.com> (raw)
In-Reply-To: <20041006233841.GA13351@tuxdriver.com>

[-- Attachment #1: Type: text/plain, Size: 685 bytes --]

John W. Linville wrote:
> Anyone here using glibc 2.3.3 on mips?  I had trouble using crosstool to
> build a gcc_3.3.3-glibc_2.3.3 combination.  gcc_3.3.3-glibc_2.3.3 seems
> to have built fine, although I haven't done much testing of the
> binaries...
> 
> If anyone is using glibc_2.3.3, what patches (if any) did you use to get
> it going?
> 
> Thanks,
> 
> John

I am not using crosstool, but have gcc-3.3.1 based cross compiler build of
glibc-2.3.3 that is running well.

Use binutils 2.15.

This all for mipsel-linux target.

Attached are my glibc-2.3.3 patches.  Still having problems getting
gcc-3.4.2 to build it, so if anybody has the magic answer for that...

David Daney.


[-- Attachment #2: glibc-2.3.3.diff --]
[-- Type: text/plain, Size: 3974 bytes --]

Only in glibc-2.3.3/manual: texis
diff -rcp glibc-2.3.3.orig/glibc-2.3.3/sysdeps/mips/dl-machine.h glibc-2.3.3/sysdeps/mips/dl-machine.h
*** glibc-2.3.3.orig/glibc-2.3.3/sysdeps/mips/dl-machine.h	2003-07-30 23:33:52.000000000 -0700
--- glibc-2.3.3/sysdeps/mips/dl-machine.h	2004-09-24 15:49:05.000000000 -0700
*************** _dl_runtime_resolve:\n							      \
*** 474,480 ****
  	" STRINGXP(PTR_LA) " $25, _dl_start_user\n\
  	.globl _dl_start_user\n\
  	.type _dl_start_user,@function\n\
- 	.ent _dl_start_user\n\
  _dl_start_user:\n\
  	" STRINGXP(SETUP_GP) "\n\
  	" STRINGXV(SETUP_GP64($18,_dl_start_user)) "\n\
--- 474,479 ----
*************** _dl_start_user:\n\
*** 512,519 ****
  	" STRINGXP(PTR_LA) " $2, _dl_fini\n\
  	# Jump to the user entry point.\n\
  	move $25, $17\n\
! 	jr $25\n\
! 	.end _dl_start_user\n\t"\
  	_RTLD_EPILOGUE(ENTRY_POINT)\
  	".previous"\
  );
--- 511,517 ----
  	" STRINGXP(PTR_LA) " $2, _dl_fini\n\
  	# Jump to the user entry point.\n\
  	move $25, $17\n\
! 	jr $25\n\t" \
  	_RTLD_EPILOGUE(ENTRY_POINT)\
  	".previous"\
  );
diff -rcp glibc-2.3.3.orig/glibc-2.3.3/sysdeps/mips/__longjmp.c glibc-2.3.3/sysdeps/mips/__longjmp.c
*** glibc-2.3.3.orig/glibc-2.3.3/sysdeps/mips/__longjmp.c	2001-07-05 21:56:00.000000000 -0700
--- glibc-2.3.3/sysdeps/mips/__longjmp.c	2004-09-24 15:51:06.000000000 -0700
*************** __longjmp (env, val_arg)
*** 37,42 ****
--- 37,43 ----
       along the way.  */
    register int val asm ("a1");
  
+ #ifndef __mips_soft_float
    /* Pull back the floating point callee-saved registers.  */
    asm volatile ("l.d $f20, %0" : : "m" (env[0].__fpregs[0]));
    asm volatile ("l.d $f22, %0" : : "m" (env[0].__fpregs[1]));
*************** __longjmp (env, val_arg)
*** 48,53 ****
--- 49,55 ----
    /* Get and reconstruct the floating point csr.  */
    asm volatile ("lw $2, %0" : : "m" (env[0].__fpc_csr));
    asm volatile ("ctc1 $2, $31");
+ #endif
  
    /* Get the GP. */
    asm volatile ("lw $gp, %0" : : "m" (env[0].__gp));
Only in glibc-2.3.3/sysdeps/mips: __longjmp.c~
diff -rcp glibc-2.3.3.orig/glibc-2.3.3/sysdeps/mips/setjmp_aux.c glibc-2.3.3/sysdeps/mips/setjmp_aux.c
*** glibc-2.3.3.orig/glibc-2.3.3/sysdeps/mips/setjmp_aux.c	2003-03-20 02:27:55.000000000 -0800
--- glibc-2.3.3/sysdeps/mips/setjmp_aux.c	2004-09-24 15:50:50.000000000 -0700
***************
*** 27,32 ****
--- 27,33 ----
  int
  __sigsetjmp_aux (jmp_buf env, int savemask, int sp, int fp)
  {
+ #ifndef __mips_soft_float
    /* Store the floating point callee-saved registers...  */
    asm volatile ("s.d $f20, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[0]));
    asm volatile ("s.d $f22, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[1]));
*************** __sigsetjmp_aux (jmp_buf env, int savema
*** 34,40 ****
    asm volatile ("s.d $f26, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[3]));
    asm volatile ("s.d $f28, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[4]));
    asm volatile ("s.d $f30, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[5]));
! 
    /* .. and the PC;  */
    asm volatile ("sw $31, %0" : : "m" (env[0].__jmpbuf[0].__pc));
  
--- 35,41 ----
    asm volatile ("s.d $f26, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[3]));
    asm volatile ("s.d $f28, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[4]));
    asm volatile ("s.d $f30, %0" : : "m" (env[0].__jmpbuf[0].__fpregs[5]));
! #endif
    /* .. and the PC;  */
    asm volatile ("sw $31, %0" : : "m" (env[0].__jmpbuf[0].__pc));
  
*************** __sigsetjmp_aux (jmp_buf env, int savema
*** 57,64 ****
--- 58,67 ----
    asm volatile ("sw $22, %0" : : "m" (env[0].__jmpbuf[0].__regs[6]));
    asm volatile ("sw $23, %0" : : "m" (env[0].__jmpbuf[0].__regs[7]));
  
+ #ifndef __mips_soft_float
    /* .. and finally get and reconstruct the floating point csr.  */
    asm ("cfc1 %0, $31" : "=r" (env[0].__jmpbuf[0].__fpc_csr));
+ #endif
  
    /* Save the signal mask if requested.  */
    return __sigjmp_save (env, savemask);
Only in glibc-2.3.3/sysdeps/mips: setjmp_aux.c~

      reply	other threads:[~2004-10-06 23:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-06 23:38 glibc 2.3.3 patches for mips? John W. Linville
2004-10-06 23:53 ` David Daney [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4164857E.3000601@avtrex.com \
    --to=ddaney@avtrex.com \
    --cc=linux-mips@linux-mips.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.