This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

MIPS soft-float support


Hi,

Please let me know if this is the wrong mail list to bring this up on.

I'm using glibc-2.5 with
    binutils-2.16.91.0.7
    gcc-4.1.0
    libc-linux-headers-2.6.12.0
building on i686-pc-linux for mips-linux. I've configured my
mips-linux-gcc with "--with-float=soft" because my target does not have
a math coprocessor. When I build glibc, I get the following error:

mips-linux-gcc
-mabi=32 ../glibc-ports-2.5/sysdeps/mips/fpu/feholdexcpt.c -c -std=gnu99
-O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -g
-Wstrict-prototypes     -Wno-uninitialized -D__NO_MATH_INLINES
-D__LIBC_INTERNAL_MATH_INLINES -DNO_LONG_DOUBLE -D_Mlong_double_=double
-I../include -I/local_home/toolchain3/glibc-mips-linux/math
-I/local_home/toolchain3/glibc-mips-linux
-I../glibc-ports-2.5/sysdeps/mips/elf
-I../glibc-ports-2.5/sysdeps/unix/sysv/linux/mips/mips32
-I../glibc-ports-2.5/sysdeps/unix/sysv/linux/mips/nptl
-I../glibc-ports-2.5/sysdeps/unix/sysv/linux/mips
-I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread
-I../sysdeps/pthread -I../glibc-ports-2.5/sysdeps/unix/sysv/linux
-I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common
-I../sysdeps/unix/mman -I../sysdeps/unix/inet
-I../nptl/sysdeps/unix/sysv -I../glibc-ports-2.5/sysdeps/unix/sysv
-I../sysdeps/unix/sysv -I../glibc-ports-2.5/sysdeps/unix/mips/mips32
-I../glibc-ports-2.5/sysdeps/unix/mips -I../nptl/sysdeps/unix
-I../glibc-ports-2.5/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix
-I../glibc-ports-2.5/sysdeps/mips/mips32
-I../glibc-ports-2.5/sysdeps/mips -I../sysdeps/ieee754/flt-32
-I../sysdeps/ieee754/dbl-64 -I../sysdeps/wordsize-32
-I../glibc-ports-2.5/sysdeps/mips/fpu
-I../glibc-ports-2.5/sysdeps/mips/nptl -I../sysdeps/ieee754
-I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl
-I../glibc-ports-2.5  -I.. -I../libio -I. -nostdinc
-isystem /opt/sciatl/1.0.0.2/lib/gcc/mips-linux/4.1.0/include
-isystem /opt/sciatl/1.0.0.2/mips-linux/include -D_LIBC_REENTRANT
-include ../include/libc-symbols.h  -DPIC -DNOT_IN_libc=1 -DIS_IN_libm=1
-o /local_home/toolchain3/glibc-mips-linux/math/feholdexcpt.o -MD -MP
-MF /local_home/toolchain3/glibc-mips-linux/math/feholdexcpt.o.dt
-MT /local_home/toolchain3/glibc-mips-linux/math/feholdexcpt.o
../glibc-ports-2.5/sysdeps/mips/fpu/feholdexcpt.c: In function
âfeholdexceptâ:
../glibc-ports-2.5/sysdeps/mips/fpu/feholdexcpt.c:30: warning: statement
with no effect
../glibc-ports-2.5/sysdeps/mips/fpu/feholdexcpt.c:34: error:
â_FPU_MASK_Vâ undeclared (first use in this function)
../glibc-ports-2.5/sysdeps/mips/fpu/feholdexcpt.c:34: error: (Each
undeclared identifier is reported only once
../glibc-ports-2.5/sysdeps/mips/fpu/feholdexcpt.c:34: error: for each
function it appears in.)
../glibc-ports-2.5/sysdeps/mips/fpu/feholdexcpt.c:34: error:
â_FPU_MASK_Zâ undeclared (first use in this function)
../glibc-ports-2.5/sysdeps/mips/fpu/feholdexcpt.c:34: error:
â_FPU_MASK_Oâ undeclared (first use in this function)
../glibc-ports-2.5/sysdeps/mips/fpu/feholdexcpt.c:34: error:
â_FPU_MASK_Uâ undeclared (first use in this function)
../glibc-ports-2.5/sysdeps/mips/fpu/feholdexcpt.c:34: error:
â_FPU_MASK_Iâ undeclared (first use in this function)
make[4]: ***
[/local_home/toolchain3/glibc-mips-linux/math/feholdexcpt.o] Error 1
make[4]: Leaving directory `/local_home/toolchain3/glibc-2.5/math'
make[3]: *** [math/others] Error 2
make[3]: Leaving directory `/local_home/toolchain3/glibc-2.5'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/local_home/toolchain3/glibc-mips-linux'

Is a patch like the following the right fix for this:

--- glibc-2.4.orig/glibc-ports-2.4/sysdeps/mips/fpu_control.h
2007-06-14 13:37:59.000000000 -0700
+++ glibc-2.4/glibc-ports-2.4/sysdeps/mips/fpu_control.h    2007-06-14
13:39:48.000000000 -0700
@@ -67,6 +67,13 @@
 #define _FPU_SETCW(cw) do { } while (0)
 extern fpu_control_t __fpu_control;

+/* masking of interrupts */
+#define _FPU_MASK_V     0x0800  /* Invalid operation */
+#define _FPU_MASK_Z     0x0400  /* Division by zero  */
+#define _FPU_MASK_O     0x0200  /* Overflow          */
+#define _FPU_MASK_U     0x0100  /* Underflow         */
+#define _FPU_MASK_I     0x0080  /* Inexact operation */
+
 #else /* __mips_soft_float */

 /* masking of interrupts */


Or am I doing something else wrong?

Thanks,
-John



     - - - - - Appended by Scientific Atlanta, a Cisco company - - - - - 
This e-mail and any attachments may contain information which is confidential,
proprietary, privileged or otherwise protected by law. The information is solely
intended for the named addressee (or a person responsible for delivering it to
the addressee). If you are not the intended recipient of this message, you are
not authorized to read, print, retain, copy or disseminate this message or any
part of it. If you have received this e-mail in error, please notify the sender
immediately by return e-mail and delete it from your computer.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]