floating-point exceptions in Tcl on amd64

Mikhail Teterin mi+kde at aldan.algebra.com
Thu Jun 9 12:36:37 GMT 2005


Hello!

If I use `-O2 -fno-strict-aliasing -march=opteron' on amd64, many of the
Tcl's own test scripts die with SIGFPE.

Replacing `-O2' with `-O' in the above line fixes the problem.

My entire system (world and ports) is built with `-O2', but only Tcl
seems troublesome.

I notice, that Tcl's tclUnixInit.c calls:

	fpsetround(FP_RN);
	fpsetmask(0L);

Can these calls be related to the problem? Perhaps, they should only
be made on i386? I have no idea, what they are for :-)

Thanks!

	-mi

P.S. I intend to upgrade lang/tcl84 and x11-toolkits/tk84 to 8.4.10.
"Scream if you need anything".





More information about the freebsd-ports mailing list