2819200 fix breaks Tcl on MIPS on Linux
Closed / Fixed2902010fffffffffffffffffffffffffffffffffCreated 17 years agoUpdated 17 years ago
Descriptionplain2009-11-22 11:15:50
Hi! Appears that the fix for bug 2819200 breaks Tcl on MIPS architecture on Linux OS (at least on Debian). Debian (I'm not sure about other Linux distributions) doesn't have <sys/fpu.h>, so It becomes impossible to build 8.5.8 on it (see https://buildd.debian.org/fetch.cgi?pkg=tcl8.5&arch=mips&ver=8.5.8-1&stamp=1258718436&file=log&as=raw for details). On the other hand, removing the patch from 2819200 makes Tcl 8.5.8 build fine and pass test suite without errors (I did the experiment in Qemu, so the result for a real hardware may differ). It's likely that changing FPU settings isn't required (and isn't even possible?) in Linux, so the code from 2819200 shouldn't be called for Linux.
dgpplain2009-11-23 07:09:13
what compiler is used when the failure is observed?
stwoplain2009-11-23 10:37:47
This also breaks OpenBSD/MIPS.
I'm waiting for a more detailed report from the person who reported this to me.
Meanwhile, this patch is being used, supplied for informational purposes.
No idea what the fix should be.
--- generic/tclStrToD.c.orig Sun Nov 22 13:37:00 2009
+++ generic/tclStrToD.c Sun Nov 22 13:39:08 2009
@@ -73,7 +73,7 @@ typedef unsigned int fpu_control_t __attribute__ ((__m
* MIPS floating-point units need special settings in control registers
* to use gradual underflow as we expect.
*/
-#if defined(__mips)
+#if defined(__mips) && !defined(__OpenBSD__)
#include <sys/fpu.h>
#endif
/*
@@ -2166,7 +2166,7 @@ TclInitDoubleConversion(void)
} bitwhack;
#endif
-#if defined(__mips)
+#if defined(__mips) && !defined(__OpenBSD__)
union fpc_csr mipsCR;
mipsCR.fc_word = get_fpc_csr();
teopetukplain2009-11-23 13:13:13
GCC 4.3.4 was used, but the failure doesn't depend on GCC version.
dgpplain2009-11-26 02:01:21
File Added - 352541: 2819200.patch
dgpplain2009-11-26 02:01:58
Please test the attached patch.
teopetukplain2009-11-26 17:42:56
Works for Debian Linux (tested with GCC 4.2).
dgpplain2009-12-08 00:16:33
Thanks for testing! Fix committed for 8.5.9 and 8.6b2.
dgpplain2009-12-08 00:16:49
allow_comments - 1
Log in (anonymous is fine) to add a comment.
Attachments:
- 2819200.patch [download] added by dgp on 2009-11-26 02:01:21. [details]