patches/dmalloc/5.5.2/130-mips.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed May 20 20:13:13 2009 +0000 (2009-05-20)
changeset 1345 27fec561af53
parent 103 b6e20abe9256
permissions -rw-r--r--
Merge the uClinux/noMMU stuff back to /trunk:
- merge Linux and uClinux back to a single kernel
- add ARCH_USE_MMU and acquainted config options that
architectures can auto-select
- make binutils and elf2flt two "Binary utilities" that
go in a single common sub-{menu,directory} structure

-------- diffstat follows --------
/trunk/scripts/build/kernel/uclinux.sh | 2 0 2 0 -
/trunk/scripts/build/kernel/linux.sh | 206 204 2 0 +++++++++++++++++++++++++++++
/trunk/scripts/build/kernel/linux-common.sh | 198 0 198 0 ----------------------------
/trunk/scripts/build/binutils.sh | 232 0 232 0 --------------------------------
/trunk/scripts/build/elf2flt.sh | 150 0 150 0 ---------------------
/trunk/scripts/crosstool-NG.sh.in | 6 4 2 0 +
/trunk/config/kernel/linux.in | 249 249 0 0 +++++++++++++++++++++++++++++++++++
/trunk/config/kernel/linux.in-common | 252 0 252 0 -----------------------------------
/trunk/config/kernel/uclinux.in | 21 0 21 0 ---
/trunk/config/target.in | 23 22 1 0 +++
/trunk/config/elf2flt.in | 49 0 49 0 -------
/trunk/config/libc/glibc.in | 2 1 1 0
/trunk/config/libc/eglibc.in | 2 1 1 0
/trunk/config/config.in | 1 0 1 0 -
/trunk/config/arch/sh.in | 1 1 0 0 +
/trunk/config/arch/arm.in | 2 1 1 0
/trunk/config/arch/powerpc.in | 1 1 0 0 +
/trunk/config/arch/ia64.in | 1 1 0 0 +
/trunk/config/arch/alpha.in | 1 1 0 0 +
/trunk/config/arch/x86.in | 1 1 0 0 +
/trunk/config/arch/mips.in | 1 1 0 0 +
/trunk/config/arch/powerpc64.in | 1 1 0 0 +
22 files changed, 489 insertions(+), 913 deletions(-)
     1 Patch to correctly handle the MIPS case.
     2 
     3 It was build up by Yann E. MORIN <yann.morin.1998@anciens.enib.fr> from some
     4 bits gathered from buildroot, which is LGPL v2.1
     5 License for dmalloc is:
     6  * Permission to use, copy, modify, and distribute this software for
     7  * any purpose and without fee is hereby granted, provided that the
     8  * above copyright notice and this permission notice appear in all
     9  * copies, and that the name of Gray Watson not be used in advertising
    10  * or publicity pertaining to distribution of the document or software
    11  * without specific, written prior permission.
    12  *
    13  * Gray Watson makes no representations about the suitability of the
    14  * software described herein for any purpose.  It is provided "as is"
    15  * without express or implied warranty.
    16 
    17 I personnaly believe that the resulting code should therefore be
    18 LGPL v2.1, but don't believe me, ask your lawyers!
    19 
    20 diff -dur dmalloc-5.5.2.orig/configure dmalloc-5.5.2/configure
    21 --- dmalloc-5.5.2.orig/configure	2007-05-18 12:15:39.000000000 +0200
    22 +++ dmalloc-5.5.2/configure	2007-05-18 12:15:48.000000000 +0200
    23 @@ -7107,7 +7107,7 @@
    24  echo $ECHO_N "checking return.h macros work... $ECHO_C" >&6
    25  if test "$cross_compiling" = yes; then
    26     cat >>confdefs.h <<\_ACEOF
    27 -#define RETURN_MACROS_WORK 0
    28 +#define RETURN_MACROS_WORK 1
    29  _ACEOF
    30   echo "$as_me:$LINENO: result: no" >&5
    31  echo "${ECHO_T}no" >&6
    32 diff -dur dmalloc-5.5.2.orig/return.h dmalloc-5.5.2/return.h
    33 --- dmalloc-5.5.2.orig/return.h	2007-05-14 19:26:14.000000000 +0200
    34 +++ dmalloc-5.5.2/return.h	2007-05-18 12:15:48.000000000 +0200
    35 @@ -106,26 +106,16 @@
    36  /*************************************/
    37  
    38  /*
    39 - * For DEC Mips machines running Ultrix
    40 + * For Mips machines running Linux
    41   */
    42  #if __mips
    43  
    44  /*
    45 - * I have no idea how to get inline assembly with the default cc.
    46 - * Anyone know how?
    47 - */
    48 -
    49 -#if 0
    50 -
    51 -/*
    52   * NOTE: we assume here that file is global.
    53   *
    54 - * $31 is the frame pointer.  $2 looks to be the return address but maybe
    55 - * not consistently.
    56 + * $31 is the return address.
    57   */
    58 -#define GET_RET_ADDR(file)	asm("sw $2, file")
    59 -
    60 -#endif
    61 +#define GET_RET_ADDR(file)	asm("sw $31, %0" : "=m" (file))
    62  
    63  #endif /* __mips */
    64