patches/glibc/2.2.5/cris-stack-direction.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
From http://sources.redhat.com/ml/libc-alpha/2002-06/msg00007.html
yann@1
     2
yann@1
     3
Message-ID: <15612.44228.774370.154718@honolulu.ilog.fr>
yann@1
     4
Date: Tue, 4 Jun 2002 14:04:20 +0200 (CEST)
yann@1
     5
From: Bruno Haible <bruno at clisp dot org>
yann@1
     6
To: libc-alpha at sources dot redhat dot com
yann@1
     7
Subject: cris stack direction
yann@1
     8
yann@1
     9
yann@1
    10
Hi,
yann@1
    11
yann@1
    12
While cross-compiling glibc-2.2.5 for target=cris-linux using gcc-3.1 and
yann@1
    13
binutils-2.12.90.0.7, I get an error
yann@1
    14
yann@1
    15
cris-linux-gcc cancel.c -c -O2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -g   -D__NO_WEAK_PTHREAD_ALIASES -D_RPC_THREAD_SAFE_   -I../include -I. -I/backup/cross-build/build-glibc-cris/linuxthreads -I.. -I../libio  -I/backup/cross-build/build-glibc-cris -I../sysdeps/cris/elf -I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/cris -I../sysdeps/unix/sysv/linux/cris -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/cris -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic  -nostdinc -isystem /cross/cris-linux-tools/lib/gcc-lib/cris-linux/3.1/include -isystem /cross/cris-linux/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h     -o /backup/cross-build/build-glibc-cris/linuxthreads/cancel.o
yann@1
    16
cancel.c:29:3: #error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP"
yann@1
    17
cancel.c: In function `_pthread_cleanup_push':
yann@1
    18
cancel.c:134: warning: implicit declaration of function `FRAME_LEFT'
yann@1
    19
make[2]: *** [/backup/cross-build/build-glibc-cris/linuxthreads/cancel.o] Fehler 1
yann@1
    20
yann@1
    21
The fix is to add a file sysdeps/cris/stackinfo.h.
yann@1
    22
yann@1
    23
yann@1
    24
2002-06-02  Bruno Haible  <bruno@clisp.org>
yann@1
    25
yann@1
    26
	* sysdeps/cris/stackinfo.h: New file.
yann@1
    27
yann@1
    28
*** glibc-2.2.5/sysdeps/cris/stackinfo.h.bak	2002-06-02 17:52:05.000000000 +0200
yann@1
    29
--- glibc-2.2.5/sysdeps/cris/stackinfo.h	2002-06-02 17:52:24.000000000 +0200
yann@1
    30
***************
yann@1
    31
*** 0 ****
yann@1
    32
--- 1,28 ----
yann@1
    33
+ /* Copyright (C) 2002 Free Software Foundation, Inc.
yann@1
    34
+    This file is part of the GNU C Library.
yann@1
    35
+ 
yann@1
    36
+    The GNU C Library is free software; you can redistribute it and/or
yann@1
    37
+    modify it under the terms of the GNU Lesser General Public
yann@1
    38
+    License as published by the Free Software Foundation; either
yann@1
    39
+    version 2.1 of the License, or (at your option) any later version.
yann@1
    40
+ 
yann@1
    41
+    The GNU C Library is distributed in the hope that it will be useful,
yann@1
    42
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
yann@1
    43
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
yann@1
    44
+    Lesser General Public License for more details.
yann@1
    45
+ 
yann@1
    46
+    You should have received a copy of the GNU Lesser General Public
yann@1
    47
+    License along with the GNU C Library; if not, write to the Free
yann@1
    48
+    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
yann@1
    49
+    02111-1307 USA.  */
yann@1
    50
+ 
yann@1
    51
+ /* This file contains a bit of information about the stack allocation
yann@1
    52
+    of the processor.  */
yann@1
    53
+ 
yann@1
    54
+ #ifndef _STACKINFO_H
yann@1
    55
+ #define _STACKINFO_H	1
yann@1
    56
+ 
yann@1
    57
+ /* On cris the stack grows down.  */
yann@1
    58
+ #define _STACK_GROWS_DOWN	1
yann@1
    59
+ 
yann@1
    60
+ #endif	/* stackinfo.h */
yann@1
    61