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