patches/gcc/4.2.3/210-libmudflap-susv3-legacy.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu Dec 23 20:43:32 2010 +0100 (2010-12-23)
changeset 2307 2efd46963086
parent 431 8bde4c6ea47a
permissions -rw-r--r--
buildtools: move to working directory

There is absolutely *no* reason for the buildtools (wrappers to gcc, g++,
as, ld... for the local machine) to be in the toolchain directory. Moreover,
they are removed after the build completes.

Move them out of the toolchain directory, and into the build directory (but
yet the part specific to the current toolchain). This means we no longer
need to explicitly remove them either, BTW, but we need to save/restore them
for the restart feature.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
     1 diff -durN gcc-4.2.1.orig/libmudflap/mf-hooks2.c gcc-4.2.1/libmudflap/mf-hooks2.c
     2 --- gcc-4.2.1.orig/libmudflap/mf-hooks2.c	2005-09-23 23:58:39.000000000 +0200
     3 +++ gcc-4.2.1/libmudflap/mf-hooks2.c	2007-08-03 20:35:09.000000000 +0200
     4 @@ -427,7 +427,7 @@
     5  {
     6    TRACE ("%s\n", __PRETTY_FUNCTION__);
     7    MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
     8 -  bzero (s, n);
     9 +  memset (s, 0, n);
    10  }
    11  
    12  
    13 @@ -437,7 +437,7 @@
    14    TRACE ("%s\n", __PRETTY_FUNCTION__);
    15    MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
    16    MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
    17 -  bcopy (src, dest, n);
    18 +  memmove (dest, src, n);
    19  }
    20  
    21  
    22 @@ -447,7 +447,7 @@
    23    TRACE ("%s\n", __PRETTY_FUNCTION__);
    24    MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
    25    MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
    26 -  return bcmp (s1, s2, n);
    27 +  return n == 0 ? 0 : memcmp (s1, s2, n);
    28  }
    29  
    30  
    31 @@ -456,7 +456,7 @@
    32    size_t n = strlen (s);
    33    TRACE ("%s\n", __PRETTY_FUNCTION__);
    34    MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
    35 -  return index (s, c);
    36 +  return strchr (s, c);
    37  }
    38  
    39  
    40 @@ -465,7 +465,7 @@
    41    size_t n = strlen (s);
    42    TRACE ("%s\n", __PRETTY_FUNCTION__);
    43    MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
    44 -  return rindex (s, c);
    45 +  return strrchr (s, c);
    46  }
    47  
    48  /* XXX:  stpcpy, memccpy */