patches/glibc/2.3.6/110-fix-pr398.patch
author Johannes Stezenbach <js@sig21.net>
Thu Jul 29 19:47:16 2010 +0200 (2010-07-29)
changeset 2045 fdaa6c7f6dea
permissions -rw-r--r--
cc/gcc: add option to compile against static libstdc++, for gcc-4.4 and newer

Idea and know-how taken from CodeSourcery build script.

Normal build:
$ ldd arm-unknown-linux-uclibcgnueabi-gcc
linux-gate.so.1 => (0xb77f3000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb76e8000)
libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb75a1000)
libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb757a000)
/lib/ld-linux.so.2 (0xb77f4000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb755c000)

CC_STATIC_LIBSTDCXX=y:
$ ldd arm-unknown-linux-uclibcgnueabi-gcc
linux-gate.so.1 => (0xb7843000)
libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb76e6000)
/lib/ld-linux.so.2 (0xb7844000)

I made CC_STATIC_LIBSTDCXX default=y since I think
it is always desirable.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
     1 Fixes error
     2 
     3 dl-runtime.c:222: error: parse error before "CFI_STARTPROC"
     4 make[2]: *** [crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/build-glibc/elf/dl-runtim
     5 e.o] Error 1
     6 make[2]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
     7 822/elf'
     8 make[1]: *** [elf/subdir_lib] Error 2
     9 make[1]: Leaving directory `crosstool-0.28-rc35/build/s390-unknown-linux-gnu/gcc-3.4.1-glibc-20040822/glibc-20040
    10 822'
    11 make: *** [all] Error 2
    12 
    13 -----------------
    14 
    15 See http://sources.redhat.com/bugzilla/show_bug.cgi?id=398
    16 http://sources.redhat.com/ml/libc-alpha/2004-07/msg00023.html
    17 
    18 -----------------
    19 
    20 CVSROOT:	/cvs/glibc
    21 Module name:	libc
    22 Branch: 	glibc-2_3-branch
    23 Changes by:	roland@sources.redhat.com	2006-02-23 22:36:51
    24 
    25 Modified files:
    26 	sysdeps/s390/s390-64: dl-machine.h 
    27 	sysdeps/s390/s390-32: dl-machine.h 
    28 
    29 Log message:
    30 	2004-07-10  GOTO Masanori  <gotom@debian.or.jp>
    31 	
    32 	[BZ #398]
    33 	* sysdeps/s390/s390-32/dl-machine.h: Include <sysdep.h> for CFI
    34 	directive.
    35 	* sysdeps/s390/s390-64/dl-machine.h: Likewise.
    36 
    37 Patches:
    38 http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-64/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.19.4.1&r2=1.19.4.2
    39 http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/sysdeps/s390/s390-32/dl-machine.h.diff?cvsroot=glibc&only_with_tag=glibc-2_3-branch&r1=1.20.4.1&r2=1.20.4.2
    40 
    41 ===================================================================
    42 RCS file: /cvs/glibc/libc/sysdeps/s390/s390-64/dl-machine.h,v
    43 retrieving revision 1.19.4.1
    44 retrieving revision 1.19.4.2
    45 diff -u -r1.19.4.1 -r1.19.4.2
    46 --- libc/sysdeps/s390/s390-64/dl-machine.h	2005/10/17 04:57:27	1.19.4.1
    47 +++ libc/sysdeps/s390/s390-64/dl-machine.h	2006/02/23 22:36:51	1.19.4.2
    48 @@ -27,6 +27,7 @@
    49  #include <sys/param.h>
    50  #include <string.h>
    51  #include <link.h>
    52 +#include <sysdep.h>
    53  
    54  /* This is an older, now obsolete value.  */
    55  #define EM_S390_OLD	0xA390
    56 ===================================================================
    57 RCS file: /cvs/glibc/libc/sysdeps/s390/s390-32/dl-machine.h,v
    58 retrieving revision 1.20.4.1
    59 retrieving revision 1.20.4.2
    60 diff -u -r1.20.4.1 -r1.20.4.2
    61 --- libc/sysdeps/s390/s390-32/dl-machine.h	2005/10/17 04:57:27	1.20.4.1
    62 +++ libc/sysdeps/s390/s390-32/dl-machine.h	2006/02/23 22:36:51	1.20.4.2
    63 @@ -27,6 +27,7 @@
    64  #include <sys/param.h>
    65  #include <string.h>
    66  #include <link.h>
    67 +#include <sysdep.h>
    68  
    69  /* This is an older, now obsolete value.  */
    70  #define EM_S390_OLD	0xA390