patches/glibc/linuxthreads-2.3.2/glibc-linuxthreads-2.3.2-allow-3.4.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Feb 24 11:00:05 2007 +0000 (2007-02-24)
changeset 1 eeea35fbf182
permissions -rw-r--r--
Add the full crosstool-NG sources to the new repository of its own.
You might just say: 'Yeah! crosstool-NG's got its own repo!".
Unfortunately, that's because the previous repo got damaged beyond repair and I had no backup.
That means I'm putting backups in place in the afternoon.
That also means we've lost history... :-(
     1 [ Revised; now also changes CFLAGS-pt-initfini.s as suggested by 
     2   http://sources.redhat.com/ml/crossgcc/2004-07/msg00169.html
     3   to not crash when building a debug glibc on mips ]
     4 
     5 Fixes errors like
     6 
     7 mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crtn.o(.text+0x0):build/mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crtn.S:20: multiple definition of `dummy'
     8 mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crti.o(.text+0x0):build/mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crti.S:42: first defined here
     9 mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crtn.o(.text+0x18):build/mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crtn.S:37: multiple definition of `_init'
    10 mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crti.o(.text+0x30):build/mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crti.S:76: first defined here
    11 mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crtn.o(.init+0x1c):build/mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crtn.S:86: multiple definition of `_fini'
    12 mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crti.o(.init+0x10):build/mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crti.S:48: first defined here
    13 mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crti.o(.init+0x28):build/mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crti.S:58: undefined reference to `i_am_not_a_leaf'
    14 mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crtn.o(.init+0x4c):build/mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crtn.S:108: undefined reference to `i_am_not_a_leaf'
    15 mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crtn.o(.init+0x50):build/mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/crtn.S:109: undefined reference to `i_am_not_a_leaf'
    16 collect2: ld returned 1 exit status
    17 make[2]: *** [build/mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/libpthread.so] Error 1
    18 make[2]: Leaving directory `build/mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/glibc-2.3.2/linuxthreads'
    19 make[1]: *** [linuxthreads/others] Error 2
    20 make[1]: Leaving directory `build/mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/glibc-2.3.2'
    21 make: *** [all] Error 2
    22 
    23 
    24 CVSROOT:	/cvs/glibc
    25 Module name:	libc
    26 Changes by:	aj@sourceware.org	2003-12-02 07:37:29
    27 
    28 Modified files:
    29 	.              : configure.in configure config.make.in 
    30 	csu            : Makefile 
    31 	locale         : Makefile 
    32 	linuxthreads   : Makefile 
    33 	linuxthreads/sysdeps/unix/sysv/linux/x86_64: Makefile 
    34 	nptl           : Makefile 
    35 	nptl/sysdeps/unix/sysv/linux/x86_64: Makefile 
    36 
    37 Log message:
    38 	* config.make.in (fno-unit-at-a-time): Define.
    39 	
    40 	* configure.in: Add test for -fno-unit-at-a-time.
    41 	Fix text for -fpie.
    42 	
    43 	* csu/Makefile (CFLAGS-initfini.s): Add $(fno_unit_at_a_time).
    44 	* locale/Makefile (CFLAGS-loadlocale.c): Likewise.
    45 	
    46 	For linuxthreads:
    47 	* Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
    48 	* sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
    49 	Likewise.
    50 	
    51 	For nptl:
    52 	* Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
    53 	* sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
    54 	Likewise.
    55 
    56 linuxthreads change retrieved with
    57 wget -O foo.patch 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/linuxthreads/Makefile.diff?r1=1.83&r2=1.84&cvsroot=glibc' \
    58 'http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/linuxthreads/sysdeps/unix/sysv/linux/x86_64/Makefile.diff?r1=1.5&r2=1.6&cvsroot=glibc'
    59 
    60 and then rediffed against glibc-2.3.2
    61 And then extended to mips...
    62 
    63 ===================================================================
    64 RCS file: /cvs/glibc/libc/linuxthreads/Makefile,v
    65 retrieving revision 1.83
    66 retrieving revision 1.84
    67 diff -u -r1.83 -r1.84
    68 --- libc/linuxthreads/Makefile	2003/10/02 18:48:48	1.83
    69 +++ libc/linuxthreads/Makefile	2003/12/02 07:37:28	1.84
    70 @@ -101,7 +101,7 @@
    71  extra-objs += $(crti-objs) $(crtn-objs)
    72  omit-deps += crti crtn
    73  
    74 -CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions
    75 +CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time)
    76  endif
    77  
    78  librt-tests = ex10 ex11
    79 ===================================================================
    80 RCS file: /cvs/glibc/libc/linuxthreads/sysdeps/unix/sysv/linux/x86_64/Makefile,v
    81 retrieving revision 1.5
    82 retrieving revision 1.6
    83 diff -u -r1.5 -r1.6
    84 --- libc/linuxthreads/sysdeps/unix/sysv/linux/x86_64/Makefile	2003/04/11 23:34:02	1.5
    85 +++ libc/linuxthreads/sysdeps/unix/sysv/linux/x86_64/Makefile	2003/12/02 07:37:28	1.6
    86 @@ -1,3 +1,4 @@
    87  ifeq ($(subdir),linuxthreads)
    88 -CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions -fno-asynchronous-unwind-tables
    89 +CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions \
    90 +		       -fno-asynchronous-unwind-tables $(fno-unit-at-a-time)
    91  endif
    92 --- glibc-2.3.2/linuxthreads/sysdeps/unix/sysv/linux/mips/Makefile.old	2004-05-30 18:24:41.000000000 -0700
    93 +++ glibc-2.3.2/linuxthreads/sysdeps/unix/sysv/linux/mips/Makefile	2004-05-30 18:28:03.000000000 -0700
    94 @@ -1,2 +1,6 @@
    95  # pull in __syscall_error routine
    96  libpthread-routines += sysdep
    97 +
    98 +ifeq ($(subdir),linuxthreads)
    99 +CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time)
   100 +endif