patches/glibc/2.3.3/glibc-2.3.2-allow-gcc-3.5-msort.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue May 08 17:48:32 2007 +0000 (2007-05-08)
changeset 78 c3868084d81a
permissions -rw-r--r--
Huge fixes to glibc build, so that we can build at least (and at last):
- use ports addon even when installing headers,
- use optimisation (-O) when installing headers, to avoid unnecessary warnings (thanks Robert P. J. DAY for pointing this out!),
- lowest kernel version to use is only X.Y.Z, not X.Y.Z.T,
- a bit of preparations for NPTL (RSN I hope),
- fix fixing the linker scripts (changing the backup file is kind of useless and stupid);

Shut uClibc finish step: there really is nothing to do;

Add a patch for glibc-2.3.6 weak aliases handling on some archs (ARM and ALPHA at least);

Did not catch the make errors: fixed the pattern matching in scripts/functions;

Introduce a new log level, ALL:
- send components' build messages there,
- DEBUG log level is destined only for crosstool-NG debug messages,
- migrate sub-actions to use appropriate log levels;

Update the armeb-unknown-linux-gnu sample:
- it builds!
- uses gcc-4.0.4 and glibc-2.3.6,
- updated to latest config options set.
     1 http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/stdlib/msort.c.diff?r1=1.20&r2=1.21&cvsroot=glibc
     2 
     3 Fixes
     4 
     5 msort.c: In function `msort_with_tmp':
     6 msort.c:59: error: invalid lvalue in increment
     7 msort.c:59: error: invalid lvalue in increment
     8 msort.c:64: error: invalid lvalue in increment
     9 msort.c:64: error: invalid lvalue in increment
    10 
    11 when building with gcc-3.5.
    12 
    13 ===================================================================
    14 RCS file: /cvs/glibc/libc/stdlib/msort.c,v
    15 retrieving revision 1.20
    16 retrieving revision 1.21
    17 diff -u -r1.20 -r1.21
    18 --- libc/stdlib/msort.c	2002/09/24 04:20:57	1.20
    19 +++ libc/stdlib/msort.c	2004/02/07 15:57:34	1.21
    20 @@ -1,6 +1,6 @@
    21  /* An alternative to qsort, with an identical interface.
    22     This file is part of the GNU C Library.
    23 -   Copyright (C) 1992,95-97,99,2000,01,02 Free Software Foundation, Inc.
    24 +   Copyright (C) 1992,95-97,99,2000,01,02,04 Free Software Foundation, Inc.
    25     Written by Mike Haertel, September 1988.
    26  
    27     The GNU C Library is free software; you can redistribute it and/or
    28 @@ -56,12 +56,16 @@
    29  	if ((*cmp) (b1, b2) <= 0)
    30  	  {
    31  	    --n1;
    32 -	    *((op_t *) tmp)++ = *((op_t *) b1)++;
    33 +	    *((op_t *) tmp) = *((op_t *) b1);
    34 +	    tmp += sizeof (op_t);
    35 +	    b1 += sizeof (op_t);
    36  	  }
    37  	else
    38  	  {
    39  	    --n2;
    40 -	    *((op_t *) tmp)++ = *((op_t *) b2)++;
    41 +	    *((op_t *) tmp) = *((op_t *) b2);
    42 +	    tmp += sizeof (op_t);
    43 +	    b2 += sizeof (op_t);
    44  	  }
    45        }
    46    else