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... :-(
yann@1
     1
[ Revised; now also changes CFLAGS-pt-initfini.s as suggested by 
yann@1
     2
  http://sources.redhat.com/ml/crossgcc/2004-07/msg00169.html
yann@1
     3
  to not crash when building a debug glibc on mips ]
yann@1
     4
yann@1
     5
Fixes errors like
yann@1
     6
yann@1
     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'
yann@1
     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
yann@1
     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'
yann@1
    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
yann@1
    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'
yann@1
    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
yann@1
    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'
yann@1
    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'
yann@1
    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'
yann@1
    16
collect2: ld returned 1 exit status
yann@1
    17
make[2]: *** [build/mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/linuxthreads/libpthread.so] Error 1
yann@1
    18
make[2]: Leaving directory `build/mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/glibc-2.3.2/linuxthreads'
yann@1
    19
make[1]: *** [linuxthreads/others] Error 2
yann@1
    20
make[1]: Leaving directory `build/mipsel-unknown-linux-gnu/gcc-3.4.0-glibc-2.3.2/glibc-2.3.2'
yann@1
    21
make: *** [all] Error 2
yann@1
    22
yann@1
    23
yann@1
    24
CVSROOT:	/cvs/glibc
yann@1
    25
Module name:	libc
yann@1
    26
Changes by:	aj@sourceware.org	2003-12-02 07:37:29
yann@1
    27
yann@1
    28
Modified files:
yann@1
    29
	.              : configure.in configure config.make.in 
yann@1
    30
	csu            : Makefile 
yann@1
    31
	locale         : Makefile 
yann@1
    32
	linuxthreads   : Makefile 
yann@1
    33
	linuxthreads/sysdeps/unix/sysv/linux/x86_64: Makefile 
yann@1
    34
	nptl           : Makefile 
yann@1
    35
	nptl/sysdeps/unix/sysv/linux/x86_64: Makefile 
yann@1
    36
yann@1
    37
Log message:
yann@1
    38
	* config.make.in (fno-unit-at-a-time): Define.
yann@1
    39
	
yann@1
    40
	* configure.in: Add test for -fno-unit-at-a-time.
yann@1
    41
	Fix text for -fpie.
yann@1
    42
	
yann@1
    43
	* csu/Makefile (CFLAGS-initfini.s): Add $(fno_unit_at_a_time).
yann@1
    44
	* locale/Makefile (CFLAGS-loadlocale.c): Likewise.
yann@1
    45
	
yann@1
    46
	For linuxthreads:
yann@1
    47
	* Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
yann@1
    48
	* sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
yann@1
    49
	Likewise.
yann@1
    50
	
yann@1
    51
	For nptl:
yann@1
    52
	* Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
yann@1
    53
	* sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
yann@1
    54
	Likewise.
yann@1
    55
yann@1
    56
linuxthreads change retrieved with
yann@1
    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' \
yann@1
    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'
yann@1
    59
yann@1
    60
and then rediffed against glibc-2.3.2
yann@1
    61
And then extended to mips...
yann@1
    62
yann@1
    63
===================================================================
yann@1
    64
RCS file: /cvs/glibc/libc/linuxthreads/Makefile,v
yann@1
    65
retrieving revision 1.83
yann@1
    66
retrieving revision 1.84
yann@1
    67
diff -u -r1.83 -r1.84
yann@1
    68
--- libc/linuxthreads/Makefile	2003/10/02 18:48:48	1.83
yann@1
    69
+++ libc/linuxthreads/Makefile	2003/12/02 07:37:28	1.84
yann@1
    70
@@ -101,7 +101,7 @@
yann@1
    71
 extra-objs += $(crti-objs) $(crtn-objs)
yann@1
    72
 omit-deps += crti crtn
yann@1
    73
 
yann@1
    74
-CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions
yann@1
    75
+CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time)
yann@1
    76
 endif
yann@1
    77
 
yann@1
    78
 librt-tests = ex10 ex11
yann@1
    79
===================================================================
yann@1
    80
RCS file: /cvs/glibc/libc/linuxthreads/sysdeps/unix/sysv/linux/x86_64/Makefile,v
yann@1
    81
retrieving revision 1.5
yann@1
    82
retrieving revision 1.6
yann@1
    83
diff -u -r1.5 -r1.6
yann@1
    84
--- libc/linuxthreads/sysdeps/unix/sysv/linux/x86_64/Makefile	2003/04/11 23:34:02	1.5
yann@1
    85
+++ libc/linuxthreads/sysdeps/unix/sysv/linux/x86_64/Makefile	2003/12/02 07:37:28	1.6
yann@1
    86
@@ -1,3 +1,4 @@
yann@1
    87
 ifeq ($(subdir),linuxthreads)
yann@1
    88
-CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions -fno-asynchronous-unwind-tables
yann@1
    89
+CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions \
yann@1
    90
+		       -fno-asynchronous-unwind-tables $(fno-unit-at-a-time)
yann@1
    91
 endif
yann@1
    92
--- glibc-2.3.2/linuxthreads/sysdeps/unix/sysv/linux/mips/Makefile.old	2004-05-30 18:24:41.000000000 -0700
yann@1
    93
+++ glibc-2.3.2/linuxthreads/sysdeps/unix/sysv/linux/mips/Makefile	2004-05-30 18:28:03.000000000 -0700
yann@1
    94
@@ -1,2 +1,6 @@
yann@1
    95
 # pull in __syscall_error routine
yann@1
    96
 libpthread-routines += sysdep
yann@1
    97
+
yann@1
    98
+ifeq ($(subdir),linuxthreads)
yann@1
    99
+CFLAGS-pt-initfini.s = -g0 -fPIC -fno-inline-functions $(fno-unit-at-a-time)
yann@1
   100
+endif