RTEMS patch for 1.9.0 and trunk
Joel Sherrill
joel.sherrill@OARcorp.com
Tue Aug 28 13:36:00 GMT 2001
Hi,
I checked out the newlib main development trunk recently and
checked the RTEMS 1.9.0 patch against it. The attached patch
is the chunk that has not been applied. Please apply it to
both the 1.9 branch and the trunk.
The patch consists of two functional parts.
1. A 1 liner to make RTEMS use the same chroot() prototype
as cygwin. Yes RTEMS has a telnetd now and chroot. :)
2. The rest of the patch turns off the i386 FPU instructions
when compiled for soft-float. I have a patch to add
soft-float multilib'ing to i386 embedded gcc targets
which will go to gcc shortly.
Changelogs are in the attachment.
Thanks.
--
Joel Sherrill, Ph.D. Director of Research & Development
joel@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
2001-08-28 Joel Sherrill <joel@OARcorp.com>
* libc/include/sys/unistd.h: Prototype chroot() for RTEMS.
2001-08-28 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* libc/machine/i386/f_atan2.S, libc/machine/i386/f_atan2f.S,
libc/machine/i386/f_exp.c, libc/machine/i386/f_expf.c,
libc/machine/i386/f_frexp.S, libc/machine/i386/f_frexpf.S,
libc/machine/i386/f_ldexp.S, libc/machine/i386/f_ldexpf.S,
libc/machine/i386/f_log.S, libc/machine/i386/f_log10.S,
libc/machine/i386/f_log10f.S, libc/machine/i386/f_logf.S,
libc/machine/i386/f_pow.c, libc/machine/i386/f_powf.c,
libc/machine/i386/f_tan.S, libc/machine/i386/f_tanf.S:
Add conditional compilation to avoid HW FPU instructions
when compiled for soft-float.
diff -uNr /usr1/rtems/work-tools/original/newlib-1.9.0/newlib/libc/include/sys/unistd.h newlib-1.9.0/newlib/libc/include/sys/unistd.h
--- /usr1/rtems/work-tools/original/newlib-1.9.0/newlib/libc/include/sys/unistd.h Thu Dec 14 15:25:44 2000
+++ newlib-1.9.0/newlib/libc/include/sys/unistd.h Wed Jan 31 11:37:16 2001
@@ -20,7 +20,7 @@
int _EXFUN(chdir, (const char *__path ));
int _EXFUN(chmod, (const char *__path, mode_t __mode ));
int _EXFUN(chown, (const char *__path, uid_t __owner, gid_t __group ));
-#ifdef __CYGWIN__
+#if defined(__CYGWIN__) || defined(__rtems__)
int _EXFUN(chroot, (const char *__path ));
#endif
int _EXFUN(close, (int __fildes ));
diff -uNr /usr1/rtems/work-tools/original/newlib-1.9.0/newlib/libc/machine/i386/f_atan2.S newlib-1.9.0/newlib/libc/machine/i386/f_atan2.S
--- /usr1/rtems/work-tools/original/newlib-1.9.0/newlib/libc/machine/i386/f_atan2.S Mon Aug 28 12:50:06 2000
+++ newlib-1.9.0/newlib/libc/machine/i386/f_atan2.S Wed Feb 21 11:59:31 2001
@@ -8,6 +8,8 @@
* ====================================================
*/
+#if !defined(_SOFT_FLOAT)
+
/*
Fast version of atan2 using Intel float instructions.
@@ -31,3 +33,5 @@
leave
ret
+
+#endif
diff -uNr /usr1/rtems/work-tools/original/newlib-1.9.0/newlib/libc/machine/i386/f_atan2f.S newlib-1.9.0/newlib/libc/machine/i386/f_atan2f.S
--- /usr1/rtems/work-tools/original/newlib-1.9.0/newlib/libc/machine/i386/f_atan2f.S Mon Aug 28 12:50:06 2000
+++ newlib-1.9.0/newlib/libc/machine/i386/f_atan2f.S Wed Feb 21 11:59:31 2001
@@ -8,6 +8,8 @@
* ====================================================
*/
+#if !defined(_SOFT_FLOAT)
+
/*
Fast version of atan2f using Intel float instructions.
@@ -31,3 +33,5 @@
leave
ret
+
+#endif
diff -uNr /usr1/rtems/work-tools/original/newlib-1.9.0/newlib/libc/machine/i386/f_exp.c newlib-1.9.0/newlib/libc/machine/i386/f_exp.c
--- /usr1/rtems/work-tools/original/newlib-1.9.0/newlib/libc/machine/i386/f_exp.c Thu Feb 17 13:39:46 2000
+++ newlib-1.9.0/newlib/libc/machine/i386/f_exp.c Wed Feb 21 11:59:31 2001
@@ -8,6 +8,8 @@
* ====================================================
*/
+#if !defined(_SOFT_FLOAT)
+
/*
Fast version of exp using Intel float instructions.
@@ -42,4 +44,4 @@
return x;
}
-
+#endif
diff -uNr /usr1/rtems/work-tools/original/newlib-1.9.0/newlib/libc/machine/i386/f_expf.c newlib-1.9.0/newlib/libc/machine/i386/f_expf.c
--- /usr1/rtems/work-tools/original/newlib-1.9.0/newlib/libc/machine/i386/f_expf.c Thu Feb 17 13:39:46 2000
+++ newlib-1.9.0/newlib/libc/machine/i386/f_expf.c Wed Feb 21 11:59:31 2001
@@ -8,6 +8,8 @@
* ====================================================
*/
+#if !defined(_SOFT_FLOAT)
+
/*
Fast version of exp using Intel float instructions.
@@ -42,4 +44,4 @@
return x;
}
-
+#endif
diff -uNr /usr1/rtems/work-tools/original/newlib-1.9.0/newlib/libc/machine/i386/f_frexp.S newlib-1.9.0/newlib/libc/machine/i386/f_frexp.S
--- /usr1/rtems/work-tools/original/newlib-1.9.0/newlib/libc/machine/i386/f_frexp.S Mon Aug 28 12:50:06 2000
+++ newlib-1.9.0/newlib/libc/machine/i386/f_frexp.S Wed Feb 21 11:59:31 2001
@@ -8,6 +8,8 @@
* ====================================================
*/
+#if !defined(_SOFT_FLOAT)
+
/*
Fast version of frexp using Intel float instructions.
@@ -42,3 +44,5 @@
leave
ret
+
+#endif
diff -uNr /usr1/rtems/work-tools/original/newlib-1.9.0/newlib/libc/machine/i386/f_frexpf.S newlib-1.9.0/newlib/libc/machine/i386/f_frexpf.S
--- /usr1/rtems/work-tools/original/newlib-1.9.0/newlib/libc/machine/i386/f_frexpf.S Mon Aug 28 12:50:06 2000
+++ newlib-1.9.0/newlib/libc/machine/i386/f_frexpf.S Wed Feb 21 11:59:31 2001
@@ -8,6 +8,8 @@
* ====================================================
*/
+#if !defined(_SOFT_FLOAT)
+
/*
Fast version of frexpf using Intel float instructions.
@@ -42,3 +44,5 @@
leave
ret
+
+#endif
diff -uNr /usr1/rtems/work-tools/original/newlib-1.9.0/newlib/libc/machine/i386/f_ldexp.S newlib-1.9.0/newlib/libc/machine/i386/f_ldexp.S
--- /usr1/rtems/work-tools/original/newlib-1.9.0/newlib/libc/machine/i386/f_ldexp.S Mon Aug 28 12:50:06 2000
+++ newlib-1.9.0/newlib/libc/machine/i386/f_ldexp.S Wed Feb 21 11:59:31 2001
@@ -8,6 +8,8 @@
* ====================================================
*/
+#if !defined(_SOFT_FLOAT)
+
/*
Fast version of ldexp using Intel float instructions.
@@ -32,3 +34,5 @@
leave
ret
+
+#endif
diff -uNr /usr1/rtems/work-tools/original/newlib-1.9.0/newlib/libc/machine/i386/f_ldexpf.S newlib-1.9.0/newlib/libc/machine/i386/f_ldexpf.S
--- /usr1/rtems/work-tools/original/newlib-1.9.0/newlib/libc/machine/i386/f_ldexpf.S Mon Aug 28 12:50:06 2000
+++ newlib-1.9.0/newlib/libc/machine/i386/f_ldexpf.S Wed Feb 21 11:59:31 2001
@@ -8,6 +8,8 @@
* ====================================================
*/
+#if !defined(_SOFT_FLOAT)
+
/*
Fast version of ldexpf using Intel float instructions.
@@ -32,3 +34,5 @@
leave
ret
+
+#endif
diff -uNr /usr1/rtems/work-tools/original/newlib-1.9.0/newlib/libc/machine/i386/f_log.S newlib-1.9.0/newlib/libc/machine/i386/f_log.S
--- /usr1/rtems/work-tools/original/newlib-1.9.0/newlib/libc/machine/i386/f_log.S Mon Aug 28 12:50:06 2000
+++ newlib-1.9.0/newlib/libc/machine/i386/f_log.S Wed Feb 21 11:59:31 2001
@@ -8,6 +8,8 @@
* ====================================================
*/
+#if !defined(_SOFT_FLOAT)
+
/*
Fast version of log using Intel float instructions.
@@ -34,3 +36,5 @@
leave
ret
+
+#endif
diff -uNr /usr1/rtems/work-tools/original/newlib-1.9.0/newlib/libc/machine/i386/f_log10.S newlib-1.9.0/newlib/libc/machine/i386/f_log10.S
--- /usr1/rtems/work-tools/original/newlib-1.9.0/newlib/libc/machine/i386/f_log10.S Mon Aug 28 12:50:06 2000
+++ newlib-1.9.0/newlib/libc/machine/i386/f_log10.S Wed Feb 21 11:59:31 2001
@@ -8,6 +8,8 @@
* ====================================================
*/
+#if !defined(_SOFT_FLOAT)
+
/*
Fast version of log10 using Intel float instructions.
@@ -34,3 +36,5 @@
leave
ret
+
+#endif
diff -uNr /usr1/rtems/work-tools/original/newlib-1.9.0/newlib/libc/machine/i386/f_log10f.S newlib-1.9.0/newlib/libc/machine/i386/f_log10f.S
--- /usr1/rtems/work-tools/original/newlib-1.9.0/newlib/libc/machine/i386/f_log10f.S Mon Aug 28 12:50:06 2000
+++ newlib-1.9.0/newlib/libc/machine/i386/f_log10f.S Wed Feb 21 11:59:31 2001
@@ -8,6 +8,8 @@
* ====================================================
*/
+#if !defined(_SOFT_FLOAT)
+
/*
Fast version of logf using Intel float instructions.
@@ -34,3 +36,5 @@
leave
ret
+
+#endif
diff -uNr /usr1/rtems/work-tools/original/newlib-1.9.0/newlib/libc/machine/i386/f_logf.S newlib-1.9.0/newlib/libc/machine/i386/f_logf.S
--- /usr1/rtems/work-tools/original/newlib-1.9.0/newlib/libc/machine/i386/f_logf.S Mon Aug 28 12:50:06 2000
+++ newlib-1.9.0/newlib/libc/machine/i386/f_logf.S Wed Feb 21 11:59:31 2001
@@ -8,6 +8,8 @@
* ====================================================
*/
+#if !defined(_SOFT_FLOAT)
+
/*
Fast version of logf using Intel float instructions.
@@ -34,3 +36,5 @@
leave
ret
+
+#endif
diff -uNr /usr1/rtems/work-tools/original/newlib-1.9.0/newlib/libc/machine/i386/f_pow.c newlib-1.9.0/newlib/libc/machine/i386/f_pow.c
--- /usr1/rtems/work-tools/original/newlib-1.9.0/newlib/libc/machine/i386/f_pow.c Thu Feb 17 13:39:46 2000
+++ newlib-1.9.0/newlib/libc/machine/i386/f_pow.c Wed Feb 21 11:59:31 2001
@@ -8,6 +8,8 @@
* ====================================================
*/
+#if !defined(_SOFT_FLOAT)
+
/*
Fast version of pow using Intel float instructions.
@@ -42,3 +44,4 @@
return pow (x,y);
}
+#endif
diff -uNr /usr1/rtems/work-tools/original/newlib-1.9.0/newlib/libc/machine/i386/f_powf.c newlib-1.9.0/newlib/libc/machine/i386/f_powf.c
--- /usr1/rtems/work-tools/original/newlib-1.9.0/newlib/libc/machine/i386/f_powf.c Thu Feb 17 13:39:46 2000
+++ newlib-1.9.0/newlib/libc/machine/i386/f_powf.c Wed Feb 21 11:59:31 2001
@@ -8,6 +8,8 @@
* ====================================================
*/
+#if !defined(_SOFT_FLOAT)
+
/*
Fast version of pow using Intel float instructions.
@@ -42,3 +44,4 @@
return powf (x,y);
}
+#endif
diff -uNr /usr1/rtems/work-tools/original/newlib-1.9.0/newlib/libc/machine/i386/f_tan.S newlib-1.9.0/newlib/libc/machine/i386/f_tan.S
--- /usr1/rtems/work-tools/original/newlib-1.9.0/newlib/libc/machine/i386/f_tan.S Mon Aug 28 12:50:06 2000
+++ newlib-1.9.0/newlib/libc/machine/i386/f_tan.S Wed Feb 21 11:59:31 2001
@@ -8,6 +8,8 @@
* ====================================================
*/
+#if !defined(_SOFT_FLOAT)
+
/*
Fast version of tan using Intel float instructions.
@@ -31,3 +33,5 @@
leave
ret
+
+#endif
diff -uNr /usr1/rtems/work-tools/original/newlib-1.9.0/newlib/libc/machine/i386/f_tanf.S newlib-1.9.0/newlib/libc/machine/i386/f_tanf.S
--- /usr1/rtems/work-tools/original/newlib-1.9.0/newlib/libc/machine/i386/f_tanf.S Mon Aug 28 12:50:06 2000
+++ newlib-1.9.0/newlib/libc/machine/i386/f_tanf.S Wed Feb 21 11:59:31 2001
@@ -8,6 +8,8 @@
* ====================================================
*/
+#if !defined(_SOFT_FLOAT)
+
/*
Fast version of tanf using Intel float instructions.
@@ -31,3 +33,5 @@
leave
ret
+
+#endif
More information about the Newlib
mailing list