From: Joao C. <jc...@fe...> - 2003-03-15 23:23:44
|
On Saturday 15 March 2003 10:02, Rafael Laboissiere wrote: > * Joao Cardoso <jc...@fe...> [2003-03-15 01:16]: > > On Saturday 15 March 2003 00:28, Rafael Laboissiere wrote: > > > I searched a little bit further and found the excerpt below in the > > > configure.in file of the GSL project > > > (http://www.gnu.org/software/gsl/). This autoconf code is doing pretty > > > much the same thing as your code in sysloc.in, besides an compilation > > > exercise to check if the flags are really accepted in the alpha > > > architecture. > > > > hmm, I would like a better test, not just that the flag is accepted. > > Do you wiush that the compilation exercise be introduced in our > configure.ac? I can do it (but not test it fully, since I have no access > to alpha machines). It would be nice. The following program is a minimal test that does not guarantees that nn/csa and x21c.c will run OK. It tests a necessary but not sufficient condition. The other longer program I posted tests for sufficiency. #include <math.h> main() { double x; x = sqrt(-1.); if (x == x) return 1; return 0; } On a alpha/OSF: bash-2.01$ cc -ieee po.c -o po -lm && if ./po; then echo yes; else echo no; fi yes bash-2.01$ cc po.c -o po -lm && if ./po; then echo yes; else echo no; fi no bash-2.01$ gcc po.c -o po -lm && if ./po; then echo yes; else echo no; fi no bash-2.01$ gcc -mieee po.c -o po -lm && if ./po; then echo yes; else echo no; fi yes On linux: jcard@jcard:~> gcc po.c -o po -lm && if ./po; then echo yes; else echo no; fi yes jcard@jcard:~> gcc -mieee-fp po.c -o po -lm && if ./po; then echo yes; else echo no; fi yes On linux it does not seems to make a difference, but -mieee-fp is recomended. Joao |