patches/dmalloc/5.5.2/130-mips.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Fri Oct 17 12:47:53 2008 +0000 (2008-10-17)
changeset 943 1cca90ce0481
parent 103 b6e20abe9256
permissions -rw-r--r--
Update the kconfig stuff to match the one in the linux-2.6.27 version.

/trunk/kconfig/zconf.hash.c | 225 110 115 0 +++----
/trunk/kconfig/lkc_proto.h | 4 3 1 0 +
/trunk/kconfig/mconf.c | 217 110 107 0 +++---
/trunk/kconfig/menu.c | 86 60 26 0 ++-
/trunk/kconfig/symbol.c | 212 156 56 0 ++++--
/trunk/kconfig/kconfig.mk | 24 9 15 0 -
/trunk/kconfig/lex.zconf.c | 97 80 17 0 ++-
/trunk/kconfig/util.c | 38 30 8 0 +
/trunk/kconfig/lkc.h | 22 18 4 0 +
/trunk/kconfig/expr.c | 32 19 13 0 +
/trunk/kconfig/confdata.c | 254 172 82 0 +++++---
/trunk/kconfig/lxdialog/dialog.h | 12 9 3 0 +
/trunk/kconfig/lxdialog/inputbox.c | 6 3 3 0
/trunk/kconfig/lxdialog/checklist.c | 4 2 2 0
/trunk/kconfig/lxdialog/menubox.c | 6 3 3 0
/trunk/kconfig/lxdialog/textbox.c | 2 1 1 0
/trunk/kconfig/lxdialog/util.c | 47 30 17 0 +
/trunk/kconfig/lxdialog/yesno.c | 4 2 2 0
/trunk/kconfig/expr.h | 20 10 10 0
/trunk/kconfig/zconf.tab.c | 1441 793 648 0 ++++++++++++++++++++++++-------------------
/trunk/kconfig/conf.c | 276 124 152 0 ++++----
/trunk/kconfig/check-gettext.sh | 14 14 0 0 +
/trunk/ct-ng.in | 2 1 1 0
23 files changed, 1759 insertions(+), 1286 deletions(-)
yann@103
     1
Patch to correctly handle the MIPS case.
yann@103
     2
yann@103
     3
It was build up by Yann E. MORIN <yann.morin.1998@anciens.enib.fr> from some
yann@103
     4
bits gathered from buildroot, which is LGPL v2.1
yann@103
     5
License for dmalloc is:
yann@103
     6
 * Permission to use, copy, modify, and distribute this software for
yann@103
     7
 * any purpose and without fee is hereby granted, provided that the
yann@103
     8
 * above copyright notice and this permission notice appear in all
yann@103
     9
 * copies, and that the name of Gray Watson not be used in advertising
yann@103
    10
 * or publicity pertaining to distribution of the document or software
yann@103
    11
 * without specific, written prior permission.
yann@103
    12
 *
yann@103
    13
 * Gray Watson makes no representations about the suitability of the
yann@103
    14
 * software described herein for any purpose.  It is provided "as is"
yann@103
    15
 * without express or implied warranty.
yann@103
    16
yann@103
    17
I personnaly believe that the resulting code should therefore be
yann@103
    18
LGPL v2.1, but don't believe me, ask your lawyers!
yann@103
    19
yann@103
    20
diff -dur dmalloc-5.5.2.orig/configure dmalloc-5.5.2/configure
yann@103
    21
--- dmalloc-5.5.2.orig/configure	2007-05-18 12:15:39.000000000 +0200
yann@103
    22
+++ dmalloc-5.5.2/configure	2007-05-18 12:15:48.000000000 +0200
yann@103
    23
@@ -7107,7 +7107,7 @@
yann@103
    24
 echo $ECHO_N "checking return.h macros work... $ECHO_C" >&6
yann@103
    25
 if test "$cross_compiling" = yes; then
yann@103
    26
    cat >>confdefs.h <<\_ACEOF
yann@103
    27
-#define RETURN_MACROS_WORK 0
yann@103
    28
+#define RETURN_MACROS_WORK 1
yann@103
    29
 _ACEOF
yann@103
    30
  echo "$as_me:$LINENO: result: no" >&5
yann@103
    31
 echo "${ECHO_T}no" >&6
yann@103
    32
diff -dur dmalloc-5.5.2.orig/return.h dmalloc-5.5.2/return.h
yann@103
    33
--- dmalloc-5.5.2.orig/return.h	2007-05-14 19:26:14.000000000 +0200
yann@103
    34
+++ dmalloc-5.5.2/return.h	2007-05-18 12:15:48.000000000 +0200
yann@103
    35
@@ -106,26 +106,16 @@
yann@103
    36
 /*************************************/
yann@103
    37
 
yann@103
    38
 /*
yann@103
    39
- * For DEC Mips machines running Ultrix
yann@103
    40
+ * For Mips machines running Linux
yann@103
    41
  */
yann@103
    42
 #if __mips
yann@103
    43
 
yann@103
    44
 /*
yann@103
    45
- * I have no idea how to get inline assembly with the default cc.
yann@103
    46
- * Anyone know how?
yann@103
    47
- */
yann@103
    48
-
yann@103
    49
-#if 0
yann@103
    50
-
yann@103
    51
-/*
yann@103
    52
  * NOTE: we assume here that file is global.
yann@103
    53
  *
yann@103
    54
- * $31 is the frame pointer.  $2 looks to be the return address but maybe
yann@103
    55
- * not consistently.
yann@103
    56
+ * $31 is the return address.
yann@103
    57
  */
yann@103
    58
-#define GET_RET_ADDR(file)	asm("sw $2, file")
yann@103
    59
-
yann@103
    60
-#endif
yann@103
    61
+#define GET_RET_ADDR(file)	asm("sw $31, %0" : "=m" (file))
yann@103
    62
 
yann@103
    63
 #endif /* __mips */
yann@103
    64