patches/glibc/2.3.6/weakalias.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@78
     1
This one was taken from debian.
yann@78
     2
yann@78
     3
# DP: Description: Fix __bind redefinition problem
yann@78
     4
# DP: Related bugs: 
yann@78
     5
# DP: Dpatch author: Phil Blundell
yann@78
     6
# DP: Patch author: Daniel Jacobowitz
yann@78
     7
# DP: Upstream status: In CVS
yann@78
     8
# DP: Status Details:
yann@78
     9
# DP: Date: 2005-12-25
yann@78
    10
yann@78
    11
Index: sysdeps/unix/sysv/linux/arm/socket.S
yann@78
    12
===================================================================
yann@78
    13
RCS file: /cvs/glibc/ports/sysdeps/unix/sysv/linux/arm/socket.S,v
yann@78
    14
retrieving revision 1.12
yann@78
    15
retrieving revision 1.13
yann@78
    16
diff -u -r1.12 -r1.13
yann@78
    17
--- glibc-2.3.6.ds1.orig/sysdeps/unix/sysv/linux/arm/socket.S	4 Dec 2004 21:20:16 -0000	1.12
yann@78
    18
+++ glibc-2.3.6.ds1/sysdeps/unix/sysv/linux/arm/socket.S	27 Oct 2005 18:50:12 -0000	1.13
yann@78
    19
@@ -1,4 +1,6 @@
yann@78
    20
-/* Copyright (C) 1995, 1996, 1997, 1998, 2003 Free Software Foundation, Inc.
yann@78
    21
+/* Copyright (C) 1995, 1996, 1997, 1998, 2003, 2004, 2005
yann@78
    22
+   Free Software Foundation, Inc.
yann@78
    23
+
yann@78
    24
    This file is part of the GNU C Library.
yann@78
    25
 
yann@78
    26
    The GNU C Library is free software; you can redistribute it and/or
yann@78
    27
@@ -32,7 +34,11 @@
yann@78
    28
    The .S files for the other calls just #define socket and #include this.  */
yann@78
    29
 
yann@78
    30
 #ifndef __socket
yann@78
    31
+#ifndef NO_WEAK_ALIAS
yann@78
    32
 #define __socket P(__,socket)
yann@78
    33
+#else
yann@78
    34
+#define __socket socket
yann@78
    35
+#endif
yann@78
    36
 #endif
yann@78
    37
 
yann@78
    38
 #define PUSHARGS_1	str a1, [sp, $-4]!
yann@78
    39
@@ -120,4 +126,6 @@
yann@78
    40
 
yann@78
    41
 PSEUDO_END (__socket)
yann@78
    42
 
yann@78
    43
+#ifndef NO_WEAK_ALIAS
yann@78
    44
 weak_alias (__socket, socket)
yann@78
    45
+#endif