patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-msort.patch
changeset 1 eeea35fbf182
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/glibc/2.2.5/glibc-2.2.5-allow-gcc-4.0-msort.patch	Sat Feb 24 11:00:05 2007 +0000
     1.3 @@ -0,0 +1,47 @@
     1.4 +Fixes
     1.5 +
     1.6 +msort.c: In function 'msort_with_tmp':
     1.7 +msort.c:59: error: invalid lvalue in increment
     1.8 +msort.c:59: error: invalid lvalue in increment
     1.9 +msort.c:64: error: invalid lvalue in increment
    1.10 +msort.c:64: error: invalid lvalue in increment
    1.11 +make[2]: *** [/home/dank/queue/jobdir.fast2/crosstool-dev/build/i686-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.2.5/build-glibc/stdlib/msort.o] Error 1
    1.12 +make[2]: Leaving directory `/home/dank/queue/jobdir.fast2/crosstool-dev/build/i686-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.2.5/glibc-2.2.5/stdlib'
    1.13 +make[1]: *** [stdlib/subdir_lib] Error 2
    1.14 +make[1]: Leaving directory `/home/dank/queue/jobdir.fast2/crosstool-dev/build/i686-unknown-linux-gnu/gcc-4.0-20050305-glibc-2.2.5/glibc-2.2.5'
    1.15 +make: *** [all] Error 2 
    1.16 +
    1.17 +when building glibc-2.2.5 with gcc-3.4.
    1.18 +
    1.19 +Taken from ../glibc-2.3.2/glibc-2.3.2-allow-gcc-3.5-msort.patch
    1.20 +and rediffed.
    1.21 +
    1.22 +--- glibc-2.2.5/stdlib/msort.c.old	2001-07-05 21:55:41.000000000 -0700
    1.23 ++++ glibc-2.2.5/stdlib/msort.c	2005-03-10 08:24:24.152204976 -0800
    1.24 +@@ -1,6 +1,6 @@
    1.25 + /* An alternative to qsort, with an identical interface.
    1.26 +    This file is part of the GNU C Library.
    1.27 +-   Copyright (C) 1992, 1995-1997, 1999, 2000, 2001 Free Software Foundation, Inc.
    1.28 ++   Copyright (C) 1992, 1995-1997, 1999, 2000, 2001, 2004 Free Software Foundation, Inc.
    1.29 +    Written by Mike Haertel, September 1988.
    1.30 + 
    1.31 +    The GNU C Library is free software; you can redistribute it and/or
    1.32 +@@ -56,12 +56,16 @@
    1.33 + 	if ((*cmp) (b1, b2) <= 0)
    1.34 + 	  {
    1.35 + 	    --n1;
    1.36 +-	    *((op_t *) tmp)++ = *((op_t *) b1)++;
    1.37 ++	    *((op_t *) tmp) = *((op_t *) b1);
    1.38 ++	    tmp += sizeof (op_t);
    1.39 ++	    b1 += sizeof (op_t);
    1.40 + 	  }
    1.41 + 	else
    1.42 + 	  {
    1.43 + 	    --n2;
    1.44 +-	    *((op_t *) tmp)++ = *((op_t *) b2)++;
    1.45 ++	    *((op_t *) tmp) = *((op_t *) b2);
    1.46 ++	    tmp += sizeof (op_t);
    1.47 ++	    b2 += sizeof (op_t);
    1.48 + 	  }
    1.49 +       }
    1.50 +   else