patches/glibc/2.3.2/string2-typedef.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 See http://gcc.gnu.org/ml/gcc/2003-08/msg00959.html
     2 
     3 Compiling glibc-2.3.2 with a gcc-3.4 snapshot, I'm seeing
     4 a whole bunch of warnings like this:
     5 
     6 ../string/bits/string2.h:80: warning: `packed' attribute ignored
     7 ../string/bits/string2.h:81: warning: `packed' attribute ignored
     8 ...
     9 
    10 Looks like it was bad code that was silently ignored by previous compilers.
    11 Ulrich fixed it as follows:
    12 
    13 ===================================================================
    14 RCS file: /cvs/glibc/libc/string/bits/string2.h,v
    15 retrieving revision 1.68
    16 retrieving revision 1.69
    17 diff -u -r1.68 -r1.69
    18 --- libc/string/bits/string2.h	2002/05/25 06:10:18	1.68
    19 +++ libc/string/bits/string2.h	2003/08/20 00:07:37	1.69
    20 @@ -1,5 +1,5 @@
    21  /* Machine-independant string function optimizations.
    22 -   Copyright (C) 1997,1998,1999,2000,2001,2002 Free Software Foundation, Inc.
    23 +   Copyright (C) 1997-2002, 2003 Free Software Foundation, Inc.
    24     This file is part of the GNU C Library.
    25     Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
    26  
    27 @@ -76,7 +76,7 @@
    28     use unaligned memory accesses.  */
    29  # define __STRING2_COPY_TYPE(N) \
    30    typedef struct { unsigned char __arr[N]; }				      \
    31 -    __STRING2_COPY_ARR##N __attribute__ ((packed))
    32 +    __attribute__ ((__packed__)) __STRING2_COPY_ARR##N
    33  __STRING2_COPY_TYPE (2);
    34  __STRING2_COPY_TYPE (3);
    35  __STRING2_COPY_TYPE (4);