This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/29810] ld: (Warning) Unsatisfied symbol "fmodl" in file /mnt/gnu/gcc/objdir/hppa64-hp-hpux11.11/./libgfortran/.libs/libgfortran.sl
- From: "kargl at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Nov 2006 16:36:18 -0000
- Subject: [Bug libfortran/29810] ld: (Warning) Unsatisfied symbol "fmodl" in file /mnt/gnu/gcc/objdir/hppa64-hp-hpux11.11/./libgfortran/.libs/libgfortran.sl
- References: <bug-29810-276@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from kargl at gcc dot gnu dot org 2006-11-12 16:36 -------
Here's an untested patch.
Index: configure.ac
===================================================================
--- configure.ac (revision 118613)
+++ configure.ac (working copy)
@@ -235,6 +249,7 @@ AC_CHECK_LIB([m],[cexpl],[AC_DEFINE([HAV
AC_CHECK_LIB([m],[fabsf],[AC_DEFINE([HAVE_FABSF],[1],[libm includes fabsf])])
AC_CHECK_LIB([m],[fabs],[AC_DEFINE([HAVE_FABS],[1],[libm includes fabs])])
AC_CHECK_LIB([m],[fabsl],[AC_DEFINE([HAVE_FABSL],[1],[libm includes fabsl])])
+AC_CHECK_LIB([m],[fmodl],[AC_DEFINE([HAVE_FMODL],[1],[libm includes fmodl])])
AC_CHECK_LIB([m],[cabsf],[AC_DEFINE([HAVE_CABSF],[1],[libm includes cabsf])])
AC_CHECK_LIB([m],[cabs],[AC_DEFINE([HAVE_CABS],[1],[libm includes cabs])])
AC_CHECK_LIB([m],[cabsl],[AC_DEFINE([HAVE_CABSL],[1],[libm includes cabsl])])
Index: intrinsics/c99_functions.c
===================================================================
--- intrinsics/c99_functions.c (revision 118613)
+++ intrinsics/c99_functions.c (working copy)
@@ -1159,3 +1159,17 @@ ctanl (long double complex a)
}
#endif
+#if !defined(HAVE_FMODL)
+#define HAVE_FMODL 1
+long double
+fmodl (long double x, long double y)
+{
+ if (y == 0)
+ return 0;
+
+ /* Need to check that the result has the same sign as x and magnitude
+ less than the magnitude of y. */
+ return (x - floorl(x / y) * y;
+}
+#endif
+
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29810