patches/glibc/2.3.6/glibc-2.3.5-sh-memset.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
From:
yann@1
     2
	http://sources.redhat.com/ml/libc-alpha/2005-07/msg00051.html
yann@1
     3
	http://sources.redhat.com/ml/crossgcc/2005-10/msg00035.html
yann@1
     4
yann@1
     5
Message-ID: <434576E1.6020305@sscd.de>
yann@1
     6
Date: Thu, 06 Oct 2005 21:11:29 +0200
yann@1
     7
From: Alexander Sieb <sieb at sscd dot de>
yann@1
     8
To: crossgcc at sourceware dot org
yann@1
     9
Subject: Crosstool sh4-linux-gcc-4.0.2-glibc-2.3.5 patches
yann@1
    10
yann@1
    11
On sh[34]-linux, memset function does not work if 2nd argument is negative
yann@1
    12
and 3rd argument is greater than 12.
yann@1
    13
for example, memset(ptr, "\xda", 20) sets 0xff instead of 0xda.
yann@1
    14
 
yann@1
    15
Attached patch fixes this problem.
yann@1
    16
 
yann@1
    17
	* sysdeps/sh/memset.S (memset): Correct 2nd argument handling.
yann@1
    18
 
yann@1
    19
--- glibc-2.3.5.old/sysdeps/sh/memset.S	29 Apr 2003 22:47:18 -0000	1.4
yann@1
    20
+++ glibc-2.3.5/sysdeps/sh/memset.S	23 Jul 2005 08:37:21 -0000
yann@1
    21
@@ -28,6 +28,7 @@ ENTRY(memset)
yann@1
    22
 	bt.s	L_byte_loop_init
yann@1
    23
 	mov	r4,r7
yann@1
    24
 
yann@1
    25
+	extu.b	r5,r5
yann@1
    26
 	swap.b	r5,r1
yann@1
    27
 	or	r1,r5
yann@1
    28
	swap.w	r5,r1
yann@1
    29
yann@1
    30
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>