patches/glibc/ports-2.10.1/460-alpha-fix-gcc-4.1-warnings.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Dec 13 23:32:39 2011 +0100 (2011-12-13)
branch1.13
changeset 2847 c0bf2319af08
permissions -rw-r--r--
scripts: fix dumping execution backtrace

Dumping the backtrace has been broken since changeset #652e56d6d35a:
scripts: execute each steps in a subshell

We can spawn sub-sub-shells in some cases.

The way the fault handler works is to dump the backtrace, but to avoid
printing it once for every sub-shell (which could get quite confusing),
it simply exits when it detects that it is being run in a sub-shell,
leaving to the top-level shell the work to dump the backtrace.

Because each step is executed in its own sub-shell, the variable arrays
that contain the step name, the source file and line number, are lost
when exiting the per-step sub-shell.

Hence, the backtrace is currently limited to printing only the top-level
main procedure of the shell.

Fix this thus:
- when dumping the bckatraces for the steps & the functions, remember
it was dumped, and only dump it if it was not already dumped
- at the top-level shell, print the hints

Also, rename the top-level step label.

Reported-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
(transplanted from 4193d6e6a17430a177fa88c287879c2c35e319f3)
yann@1625
     1
2006-05-30  Falk Hueffner <falk@debian.org>
yann@1625
     2
yann@1625
     3
	* sysdeps/unix/sysv/linux/alpha/ioperm.c: force the architecture
yann@1625
     4
	  to ev6 in assembly code.
yann@1625
     5
yann@1625
     6
{standard input}: Assembler messages:
yann@1625
     7
{standard input}:341: Error: macro requires $at register while noat in effect
yann@1625
     8
{standard input}:374: Error: macro requires $at register while noat in effect
yann@1625
     9
{standard input}:438: Error: macro requires $at register while noat in effect
yann@1625
    10
{standard input}:471: Error: macro requires $at register while noat in effect
yann@1625
    11
make[3]: *** [/tmp/buildd/glibc-2.3.6/build-tree/alpha-libc/misc/ioperm.o] Error 1
yann@1625
    12
yann@1625
    13
Hrm. gcc puts .arch ev4 into the .s, and this overrides -mev6 for as.
yann@1625
    14
I cannot really think of anything better than
yann@1625
    15
yann@1625
    16
 ports/sysdeps/unix/sysv/linux/alpha/ioperm.c |    8 ++++----
yann@1625
    17
 1 file changed, 4 insertions(+), 4 deletions(-)
yann@1625
    18
yann@1625
    19
diff -durN glibc-2.10.1.orig/glibc-ports-2.10.1/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.10.1/glibc-ports-2.10.1/sysdeps/unix/sysv/linux/alpha/ioperm.c
yann@1625
    20
--- glibc-2.10.1.orig/glibc-ports-2.10.1/sysdeps/unix/sysv/linux/alpha/ioperm.c	2009-05-16 10:36:20.000000000 +0200
yann@1625
    21
+++ glibc-2.10.1/glibc-ports-2.10.1/sysdeps/unix/sysv/linux/alpha/ioperm.c	2009-11-13 00:50:57.000000000 +0100
yann@1625
    22
@@ -178,13 +178,13 @@
yann@1625
    23
 static inline void
yann@1625
    24
 stb_mb(unsigned char val, unsigned long addr)
yann@1625
    25
 {
yann@1625
    26
-  __asm__("stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val));
yann@1625
    27
+  __asm__(".arch ev6; stb %1,%0; mb" : "=m"(*(vucp)addr) : "r"(val));
yann@1625
    28
 }
yann@1625
    29
 
yann@1625
    30
 static inline void
yann@1625
    31
 stw_mb(unsigned short val, unsigned long addr)
yann@1625
    32
 {
yann@1625
    33
-  __asm__("stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val));
yann@1625
    34
+  __asm__(".arch ev6; stw %1,%0; mb" : "=m"(*(vusp)addr) : "r"(val));
yann@1625
    35
 }
yann@1625
    36
 
yann@1625
    37
 static inline void
yann@1625
    38
@@ -356,7 +356,7 @@
yann@1625
    39
   unsigned long int addr = dense_port_to_cpu_addr (port);
yann@1625
    40
   unsigned char r;
yann@1625
    41
 
yann@1625
    42
-  __asm__ ("ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr));
yann@1625
    43
+  __asm__ (".arch ev6; ldbu %0,%1" : "=r"(r) : "m"(*(vucp)addr));
yann@1625
    44
   return r;
yann@1625
    45
 }
yann@1625
    46
 
yann@1625
    47
@@ -366,7 +366,7 @@
yann@1625
    48
   unsigned long int addr = dense_port_to_cpu_addr (port);
yann@1625
    49
   unsigned short r;
yann@1625
    50
 
yann@1625
    51
-  __asm__ ("ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr));
yann@1625
    52
+  __asm__ (".arch ev6; ldwu %0,%1" : "=r"(r) : "m"(*(vusp)addr));
yann@1625
    53
   return r;
yann@1625
    54
 }
yann@1625
    55
 
yann@1625
    56
diff -durN glibc-2.10.1.orig/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.10.1/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c