patches/glibc/2.2.5/alpha-build-failure.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
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=156841
yann@1
     2
yann@1
     3
Here's the error I got before I applied the patch:
yann@1
     4
yann@1
     5
/home3/dank/crosstool-0.5/result/alpha-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/lib/gcc-lib/alpha-unknown-linux-gnu/3.2.3/../../../../alpha-unknown-linux-gnu/bin/ld: /home3/dank/crosstool-0.5/build/alpha-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/build-glibc/libc_pic.os: pc-relative relocation against dynamic symbol __divlu
yann@1
     6
/home3/dank/crosstool-0.5/result/alpha-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/lib/gcc-lib/alpha-unknown-linux-gnu/3.2.3/../../../../alpha-unknown-linux-gnu/bin/ld: /home3/dank/crosstool-0.5/build/alpha-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/build-glibc/libc_pic.os: pc-relative relocation against dynamic symbol __divqu
yann@1
     7
/home3/dank/crosstool-0.5/result/alpha-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/lib/gcc-lib/alpha-unknown-linux-gnu/3.2.3/../../../../alpha-unknown-linux-gnu/bin/ld: /home3/dank/crosstool-0.5/build/alpha-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/build-glibc/libc_pic.os: pc-relative relocation against dynamic symbol __remlu
yann@1
     8
/home3/dank/crosstool-0.5/result/alpha-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/lib/gcc-lib/alpha-unknown-linux-gnu/3.2.3/../../../../alpha-unknown-linux-gnu/bin/ld: /home3/dank/crosstool-0.5/build/alpha-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/build-glibc/libc_pic.os: pc-relative relocation against dynamic symbol __remqu
yann@1
     9
collect2: ld returned 1 exit status
yann@1
    10
make[1]: *** [/home3/dank/crosstool-0.5/build/alpha-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.5/build-glibc/libc.so] Error 1
yann@1
    11
yann@1
    12
yann@1
    13
--- glibc-2.2.5/sysdeps/alpha/divrem.h	6 Jul 2001 04:55:45 -0000	1.8
yann@1
    14
+++ glibc-2.2.5/sysdeps/alpha/divrem.h	15 Jun 2002 20:53:37 -0000	1.9
yann@1
    15
@@ -1,4 +1,4 @@
yann@1
    16
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
yann@1
    17
+/* Copyright (C) 1996,97,2002 Free Software Foundation, Inc.
yann@1
    18
    Contributed by David Mosberger (davidm@cs.arizona.edu).
yann@1
    19
    This file is part of the GNU C Library.
yann@1
    20
 
yann@1
    21
@@ -86,6 +86,7 @@
yann@1
    22
 
yann@1
    23
 	.align 3
yann@1
    24
 UFUNC_NAME:
yann@1
    25
+$udiv_entry:
yann@1
    26
 	lda	sp, -STACK(sp)
yann@1
    27
 	.frame	sp, STACK, retaddr, 0
yann@1
    28
 #ifdef PROF
yann@1
    29
@@ -206,7 +207,7 @@
yann@1
    30
 	cmovge	AT, AT, arg2
yann@1
    31
 
yann@1
    32
 	/* Do the unsigned division.  */
yann@1
    33
-	bsr	retaddr, UFUNC_NAME
yann@1
    34
+	bsr	retaddr, $udiv_entry
yann@1
    35
 
yann@1
    36
 	/* Restore originals and adjust the sign of the result.  */
yann@1
    37
 	ldq	arg1, 0(sp)