This is the mail archive of the gsl-discuss@sourceware.cygnus.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: prerelease checks


On Sat, 13 May 2000, Steve ROBBINS wrote:

> Hi again,
> 
> On Mon, 8 May 2000, Brian Gough wrote:
> 
> > It will be time for a new release shortly. 
> > 
> > If anyone would like to do a check from CVS we can fix any last minute
> > problems that are found.
> 
> I just tried building GSL on an alpha-based Tru64 machine.  The build
> (using egcs-2.91.66) fails:
  
  [ ... due to not finding FP_RND_RN ... ]

> This problem could be detected by the configure script and worked around.
> I should be able to post a patch later today, if nobody beats me to it.

Here is a patch to do this check on Tru64.  I see that AIX also uses
FP_RND_RN symbols, so maybe gcc on AIX would also benefit from this?  (I
don't have an AIX system to check) 

-smr

P.S.  The file `config.h.in' needn't be in CVS, as it is derived.


Index: ChangeLog
===================================================================
RCS file: /cvs/gsl/gsl/ChangeLog,v
retrieving revision 1.76
diff -u -b -B -r1.76 ChangeLog
--- ChangeLog	2000/05/10 18:27:17	1.76
+++ ChangeLog	2000/05/14 15:02:57
@@ -1,3 +1,10 @@
+2000-05-14  Steve Robbins  <steve@nyongwa.montreal.qc.ca>
+
+	* acconfig.h: 
+	* configure.in: look in both <float.h> and /usr/include/float.h,
+	to find FP_RND_RN, as some versions of GCC don't copy these
+	symbols into the `fixed' header.
+
 Wed May 10 11:30:15 2000  Brian Gough  <bjg@network-theory.co.uk>
 
 	* gsl_math.h (GSL_POSINF): make use of HUGE_VAL which is actually
Index: acconfig.h
===================================================================
RCS file: /cvs/gsl/gsl/acconfig.h,v
retrieving revision 1.15
diff -u -b -B -r1.15 acconfig.h
--- acconfig.h	2000/04/02 13:28:21	1.15
+++ acconfig.h	2000/05/14 15:02:58
@@ -33,5 +33,10 @@
 #undef HAVE_IRIX_IEEE_INTERFACE
 #undef HAVE_AIX_IEEE_INTERFACE
 
+/* Define this if we need to include /usr/include/float.h explicitly
+   in order to get FP_RND_RN and related macros.  This is known to be
+   a problem on some Compaq Tru64 unix systems when compiled with GCC. */
+#undef FIND_FP_RND_IN_USR_INCLUDE_FLOAT_H
+
 /* Define this if printf can handle %Lf for long double */
 #undef HAVE_PRINTF_LONGDOUBLE
Index: config.h.in
===================================================================
RCS file: /cvs/gsl/gsl/config.h.in,v
retrieving revision 1.32
diff -u -b -B -r1.32 config.h.in
--- config.h.in	2000/04/02 13:28:21	1.32
+++ config.h.in	2000/05/14 15:02:58
@@ -85,5 +85,10 @@
 #undef HAVE_IRIX_IEEE_INTERFACE
 #undef HAVE_AIX_IEEE_INTERFACE
 
+/* Define this if we need to include /usr/include/float.h explicitly
+   in order to get FP_RND_RN and related macros.  This is known to be
+   a problem on some Compaq Tru64 unix systems when compiled with GCC. */
+#undef FIND_FP_RND_IN_USR_INCLUDE_FLOAT_H
+
 /* Define this if printf can handle %Lf for long double */
 #undef HAVE_PRINTF_LONGDOUBLE
Index: configure.in
===================================================================
RCS file: /cvs/gsl/gsl/configure.in,v
retrieving revision 1.95
diff -u -b -B -r1.95 configure.in
--- configure.in	2000/05/05 11:15:52	1.95
+++ configure.in	2000/05/14 15:03:02
@@ -159,6 +159,7 @@
     *-*-osf*) 
         AC_DEFINE(HAVE_TRU64_IEEE_INTERFACE)
         AC_MSG_RESULT([osf/tru64]) 
+	need_fp_rnd_rn=yes
         ;;
     *-*-aix*) 
         AC_DEFINE(HAVE_AIX_IEEE_INTERFACE)
@@ -172,6 +173,29 @@
         AC_MSG_RESULT([unknown])
         ;;
 esac
+
+# On some systems requiring symbols FP_RND_{RN,RM,RP,RZ} for setting the 
+# floating-point rounding strategy, the symbols are defined in 
+# /usr/include/float.h.  However, some versions of GCC do not have
+# the symbols in the `fixed' version of float.h, so simply including
+# <float.h> does not find the symbols.  We detect this and work around
+# it in ieee-utils/fp-foo.c
+#
+if test "$need_fp_rnd_rn" = yes; then
+    AC_MSG_CHECKING(for FP_RND_RN in <float.h>)
+    AC_TRY_COMPILE( [#include <float.h>],
+		    [unsigned int rnd = FP_RND_RN;],
+	            result=yes, result=no )
+    AC_MSG_RESULT($result)
+    if test "$result" = no; then
+	AC_MSG_CHECKING(for FP_RND_RN in /usr/include/float.h)
+        AC_TRY_COMPILE( [#include "/usr/include/float.h"],
+	                [unsigned int rnd = FP_RND_RN;],
+                        AC_MSG_RESULT(yes),
+		        AC_MSG_ERROR([cannot find required FP_RND_* macros]) )
+        AC_DEFINE(FIND_FP_RND_IN_USR_INCLUDE_FLOAT_H)
+    fi
+fi        
 
 
 AC_MSG_CHECKING([for rounding-control compiler flags])
Index: ieee-utils/ChangeLog
===================================================================
RCS file: /cvs/gsl/gsl/ieee-utils/ChangeLog,v
retrieving revision 1.18
diff -u -b -B -r1.18 ChangeLog
--- ChangeLog	2000/04/02 13:28:21	1.18
+++ ChangeLog	2000/05/14 15:03:04
@@ -1,3 +1,8 @@
+2000-05-14  Steve Robbins  <steve@nyongwa.montreal.qc.ca>
+
+	* fp-tru64.c: include `/usr/include/float.h', if necessary for
+	picking up FP_RND_RN and friends.
+
 Sun Apr  2 14:25:52 2000  Brian Gough  <bjg@network-theory.co.uk>
 
 	* fp-m68klinux.c: added file for m68k support (not complete, some
Index: ieee-utils/fp-tru64.c
===================================================================
RCS file: /cvs/gsl/gsl/ieee-utils/fp-tru64.c,v
retrieving revision 1.5
diff -u -b -B -r1.5 fp-tru64.c
--- fp-tru64.c	2000/05/04 11:25:03	1.5
+++ fp-tru64.c	2000/05/14 15:03:06
@@ -40,13 +40,19 @@
  * Problem have been reported with the "fixed" float.h installed with
  * gcc-2.95 lacking some of the definitions in the system float.h (the
  * symptoms are errors like: `FP_RND_RN' undeclared). To work around
- * this it may be necessary to include the system float.h before the
- * gcc version, e.g. 
+ * this we include the system float.h before the gcc version, e.g. 
  *
  *  #include "/usr/include/float.h"
  *  #include <float.h>
  * 
+ * This is controlled by the config.h symbol 
+ * `HAVE_FP_RND_IN_USR_INCLUDE_FLOAT_H'.
  */
+
+#ifdef FIND_FP_RND_IN_USR_INCLUDE_FLOAT_H
+#  include "/usr/include/float.h"
+#  undef _FLOAT_H_
+#endif
 
 #include <float.h>
 #include <machine/fpu.h>



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]