patches/gcc/4.3.4/300-libmudflap-susv3-legacy.patch
author Cody P Schafer <dev@codyps.com>
Mon May 12 00:02:13 2014 +0200 (2014-05-12)
changeset 3322 eb13867a034c
permissions -rw-r--r--
arch/powerpc: add powerpc64le support

Technically, I don't forbid powerpcle support either, but I'm not sure that
there is any library/compiler support for that at the moment (though the hw
technically makes it possible).

powerpc64le needs glibc 2.19 and gcc 4.9. I haven't looked into the support
tools, but at least gdb 7.5 is too old (7.7.1 definitely has support).

Also make powerpc64 non-experimental. It's practically old at this point.

Signed-off-by: Cody P Schafer <dev@codyps.com>
[yann.morin.1998@free.fr: use ${target_endian_le} and ${target_bits_64}]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <64bfbbced9dd8f62e0d6.1399801945@gun>
Patchwork-Id: 347775
thomas@1461
     1
Original patch from: ../4.3.2/300-libmudflap-susv3-legacy.patch
thomas@1461
     2
thomas@1461
     3
-= BEGIN original header =-
thomas@1461
     4
Original patch from gentoo: gentoo/src/patchsets/gcc/4.3.1/uclibc/90_all_305-libmudflap-susv3-legacy.patch
thomas@1461
     5
-= END original header =-
thomas@1461
     6
thomas@1461
     7
diff -durN gcc-4.3.3.orig/libmudflap/mf-hooks2.c gcc-4.3.3/libmudflap/mf-hooks2.c
thomas@1461
     8
--- gcc-4.3.3.orig/libmudflap/mf-hooks2.c	2005-09-23 23:58:39.000000000 +0200
thomas@1461
     9
+++ gcc-4.3.3/libmudflap/mf-hooks2.c	2009-01-27 22:25:45.000000000 +0100
thomas@1461
    10
@@ -427,7 +427,7 @@
thomas@1461
    11
 {
thomas@1461
    12
   TRACE ("%s\n", __PRETTY_FUNCTION__);
thomas@1461
    13
   MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
thomas@1461
    14
-  bzero (s, n);
thomas@1461
    15
+  memset (s, 0, n);
thomas@1461
    16
 }
thomas@1461
    17
 
thomas@1461
    18
 
thomas@1461
    19
@@ -437,7 +437,7 @@
thomas@1461
    20
   TRACE ("%s\n", __PRETTY_FUNCTION__);
thomas@1461
    21
   MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
thomas@1461
    22
   MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
thomas@1461
    23
-  bcopy (src, dest, n);
thomas@1461
    24
+  memmove (dest, src, n);
thomas@1461
    25
 }
thomas@1461
    26
 
thomas@1461
    27
 
thomas@1461
    28
@@ -447,7 +447,7 @@
thomas@1461
    29
   TRACE ("%s\n", __PRETTY_FUNCTION__);
thomas@1461
    30
   MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
thomas@1461
    31
   MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
thomas@1461
    32
-  return bcmp (s1, s2, n);
thomas@1461
    33
+  return memcmp (s1, s2, n);
thomas@1461
    34
 }
thomas@1461
    35
 
thomas@1461
    36
 
thomas@1461
    37
@@ -456,7 +456,7 @@
thomas@1461
    38
   size_t n = strlen (s);
thomas@1461
    39
   TRACE ("%s\n", __PRETTY_FUNCTION__);
thomas@1461
    40
   MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
thomas@1461
    41
-  return index (s, c);
thomas@1461
    42
+  return strchr (s, c);
thomas@1461
    43
 }
thomas@1461
    44
 
thomas@1461
    45
 
thomas@1461
    46
@@ -465,7 +465,7 @@
thomas@1461
    47
   size_t n = strlen (s);
thomas@1461
    48
   TRACE ("%s\n", __PRETTY_FUNCTION__);
thomas@1461
    49
   MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
thomas@1461
    50
-  return rindex (s, c);
thomas@1461
    51
+  return strrchr (s, c);
thomas@1461
    52
 }
thomas@1461
    53
 
thomas@1461
    54
 /* XXX:  stpcpy, memccpy */