patches/glibc/ports-2.13/460-alpha-fix-gcc-4.1-warnings.patch
author Michael Hope <michael.hope@linaro.org>
Wed Oct 19 15:27:32 2011 +1300 (2011-10-19)
changeset 2739 f320e22f2cba
permissions -rw-r--r--
arch: add softfp support

Some architectures support a mixed hard/soft floating point, where
the compiler emits hardware floating point instructions, but passes
the operands in core (aka integer) registers.

For example, ARM supports this mode (to come in the next changeset).

Add support for softfp cross compilers to the GCC and GLIBC
configuration. Needed for Ubuntu and other distros that are softfp.

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