This is the mail archive of the
gsl-discuss@sourceware.cygnus.com
mailing list for the GSL project.
Re: compiling GSL on digital unix.
- To: Jon McAuliffe <jonm at amazon dot com>, Brian Gough <bjg at network-theory dot co dot uk>
- Subject: Re: compiling GSL on digital unix.
- From: Tim Mooney <mooney at dogbert dot cc dot ndsu dot nodak dot edu>
- Date: Fri, 5 Nov 1999 14:13:40 -0600 (CST)
- cc: gsl-discuss at sourceware dot cygnus dot com
In regard to: compiling GSL on digital unix., Jon McAuliffe said (at 2:53pm...:
>i'm compiling gsl-0.4.1 on digital unix v4.0e, rev. 1091, using gcc-2.7.2.3.
>i ran configure successfully. fyi, here is the system type it identified:
>
>checking host system type... alphaev56-dec-osf4.0e
>
>when i ran make, i received the following output:
>
>host:~/gsl-0.4.1 [49] make
>make all-recursive
>make[1]: Entering directory `/home3/jonm/gsl-0.4.1'
>Making all in err
>make[2]: Entering directory `/home3/jonm/gsl-0.4.1/err'
>gcc -DHAVE_CONFIG_H -I. -I. -I.. -mieee -g -O2 -c error.c
>cc1: Invalid option `ieee'
>make[2]: *** [error.o] Error 1
>make[2]: Leaving directory `/home3/jonm/gsl-0.4.1/err'
>make[1]: *** [all-recursive] Error 1
>make[1]: Leaving directory `/home3/jonm/gsl-0.4.1'
>make: *** [all-recursive-am] Error 2
>
>i poked around the Info node for gcc, trying to find documentation on -mieee.
>no luck. i then made the following change to configure:
>
>host:~/gsl-0.4.1 [51] diff configure.ORIG configure
>2210,2213d2209
>< alpha*-*-*)
>< CFLAGS="-mieee $CFLAGS"
>< echo "$ac_t""adding -mieee" 1>&6
>< ;;
>
>this change suppresses the addition of the -mieee flag for alpha machines.
>i re-ran configure, then successfully built libgsl.a.
>
>two questions:
>
>1. what is -mieee? it is not a documented part of the gcc i am using.
>
>2. am i going to get incorrect behavior out of libgsl.a by virtue of
> the absence of this architecture-dependent compile flag?
Hi Jon!
Brian Gough forwarded your message to me, regarding this issue.
You're using gsl-0.4.1 I see. There have been a few changes made since gsl
0.4.1 by Brian and I for Digital/Tru64 Unix, AIX, and IRIX. The changes
are in CVS, if you're interested in trying that version.
Based on the version of gcc you're using, it's apparent that `-mieee' is
something that was added to gcc in 2.8.x. It's there and documented in
both 2.8.1 (the version thats been most stable on my alphaev56-dec-osf4.0f
box) and in the newer 2.95.[12] releases.
Here's what gcc 2.8.1's info docs say (To see this I looked at the following
"Node" hierarchy within the gcc info docs:
Invoking GCC->Submodel Options->DEC Alpha Options
). About -mieee:
`-mieee'
The Alpha architecture implements floating-point hardware
optimized for maximum performance. It is mostly compliant with
the IEEE floating point standard. However, for full compliance,
software assistance is required. This option generates code fully
IEEE compliant code *except* that the INEXACT FLAG is not
maintained (see below). If this option is turned on, the CPP
macro `_IEEE_FP' is defined during compilation. The option is a
shorthand for: `-D_IEEE_FP -mfp-trap-mode=su -mtrap-precision=i
-mieee-conformant'. The resulting code is less efficient but is
able to correctly support denormalized numbers and exceptional
IEEE values such as not-a-number and plus/minus infinity. Other
Alpha compilers call this option `-ieee_with_no_inexact'.
Note there's also the related option:
`-mieee-with-inexact'
This is like `-mieee' except the generated code also maintains the
IEEE INEXACT FLAG. Turning on this option causes the generated
code to implement fully-compliant IEEE math. The option is a
shorthand for `-D_IEEE_FP -D_IEEE_FP_INEXACT' plus the three
following: `-mieee-conformant', `-mfp-trap-mode=sui', and
`-mtrap-precision=i'. On some Alpha implementations the resulting
code may execute significantly slower than the code generated by
default. Since there is very little code that depends on the
INEXACT FLAG, you should normally not specify this option. Other
Alpha compilers call this option `-ieee_with_inexact'.
Brian and I discussed this some, and it was decided that it wasn't worth it
to have `-mieee-with-inexact' added to the CFLAGS by configure for GSL,
since it's not as often needed. It *is* worth it to have `-mieee'
in the CFLAGS, though, since correct IEEE-conformant behavior requires that.
My suggestion would be to upgrade to gcc 2.8.1. Barring that, the GSL
maintainers need to decide if they would like to support the pre 2.8.x
versions of gcc on the alpha & Digital Unix (I'm not sure if the alpha-linux
gcc 2.7.x is also missing this option, but I would be it *is*). If they
think it's important I would be willing to submit additional code to
configure.in to augment the code that's in CVS already, so that we
actually check to make sure that gcc groks that option, rather than
assuming. The problem is that I don't think there's an equivalent option
in 2.7.2.x, so code compiled with that version of gcc (including libgsl)
would not be fully IEEE compliant.
You may also want to use the GSL from CVS. The changes Brian and I made
for improved support on Digital Unix, AIX, and IRIX are all post-0.4.1.
Brian also fixed a large number of warnings and some possible bugs too.
On more note. GSL's configure augments CFLAGS for either Linux or Digital
Unix on the alpha because its configure.in authors know that to get fully
compliant IEEE code some special options are required. Packages that *use*
GSL don't generally know that, though, and code that uses GSL on the alpha
should be compiled using the same set of rounding and IEEE-related CFLAGS as
GSL itself used. This means that for packages that use GSL or software you
write yourself that uses GSL, be sure you compile using the appropriate
CFLAGS to enable soft-controlled rounding and IEEE compliant code.
I hope this helps. Please let me know if I can help further.
(I'm not currently subscribed to the gsl list, so if you respond, please
cc me. Thanks!)
Tim
--
Tim Mooney mooney@dogbert.cc.ndsu.NoDak.edu
Information Technology Services (701) 231-1076 (Voice)
Room 242-J1, IACC Building (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164