patches/glibc/2.1.3/rh62-99-glibc-2.1.3-allow-gcc-3.4-gconv_stubs.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.
yann@1
     1
"Fixes" gcc-3.4.0 errors:
yann@1
     2
gconv_stubs.c:49: error: conflicting types for '__gconv_close_transform'
yann@1
     3
../iconv/gconv_int.h:131: error: previous declaration of '__gconv_close_transform' was here
yann@1
     4
gconv_stubs.c:49: error: conflicting types for '__gconv_close_transform'
yann@1
     5
../iconv/gconv_int.h:131: error: previous declaration of '__gconv_close_transform' was here
yann@1
     6
gconv_stubs.c:52: error: conflicting types for '__gconv'
yann@1
     7
../iconv/gconv_int.h:112: error: previous declaration of '__gconv' was here
yann@1
     8
gconv_stubs.c:52: error: conflicting types for '__gconv'
yann@1
     9
../iconv/gconv_int.h:112: error: previous declaration of '__gconv' was here
yann@1
    10
gconv_stubs.c:54: error: conflicting types for '__gconv_find_transform'
yann@1
    11
../iconv/gconv_int.h:119: error: previous declaration of '__gconv_find_transform' was here
yann@1
    12
gconv_stubs.c:54: error: conflicting types for '__gconv_find_transform'
yann@1
    13
../iconv/gconv_int.h:119: error: previous declaration of '__gconv_find_transform' was here
yann@1
    14
gconv_stubs.c:56: error: conflicting types for '__gconv_open'
yann@1
    15
../iconv/gconv_int.h:99: error: previous declaration of '__gconv_open' was here
yann@1
    16
gconv_stubs.c:56: error: conflicting types for '__gconv_open'
yann@1
    17
../iconv/gconv_int.h:99: error: previous declaration of '__gconv_open' was here
yann@1
    18
make[2]: *** [/home/dank/wk/crosstool-0.28-rc4h/build/i686-unknown-linux-gnu/gcc-3.4.0-20040406-glibc-2.1.3/build-glibc/c_stubs/gconv_stubs.o] Error 1
yann@1
    19
make[2]: Leaving directory `/home/dank/wk/crosstool-0.28-rc4h/build/i686-unknown-linux-gnu/gcc-3.4.0-20040406-glibc-2.1.3/glibc-2.1.3/c_stubs'
yann@1
    20
yann@1
    21
although the right thing would probably be to declare the 
yann@1
    22
stubs to have the right attributes.
yann@1
    23
yann@1
    24
--- glibc-2.1.3/c_stubs/gconv_stubs.c.old	Sun Apr 11 20:25:09 2004
yann@1
    25
+++ glibc-2.1.3/c_stubs/gconv_stubs.c	Sun Apr 11 20:29:35 2004
yann@1
    26
@@ -18,7 +18,18 @@
yann@1
    27
    Boston, MA 02111-1307, USA.  */
yann@1
    28
 
yann@1
    29
 #include <features.h>
yann@1
    30
+
yann@1
    31
+/* strange hack workaround for gcc-3.4.0.  Might be a better way. */
yann@1
    32
+#define __gconv_close_transform foo__gconv_close_transform
yann@1
    33
+#define __gconv foo__gconv
yann@1
    34
+#define __gconv_find_transform foo__gconv_find_transform
yann@1
    35
+#define __gconv_open foo__gconv_open
yann@1
    36
+
yann@1
    37
 #include <gconv_int.h>
yann@1
    38
+#undef __gconv_close_transform
yann@1
    39
+#undef __gconv
yann@1
    40
+#undef __gconv_find_transform
yann@1
    41
+#undef __gconv_open
yann@1
    42
 
yann@1
    43
 /* hack for self identification */
yann@1
    44
 int __c_stubs_is_compiled_in;