public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] libstdc++: Fix build for AVR [PR115481, PR111639]
       [not found] ` <bug-115481-3249-15VyLpgmpe@http.gcc.gnu.org/bugzilla/>
@ 2024-06-14 17:37   ` Detlef Vollmann
  2024-06-14 17:45     ` Xi Ruoyao
  0 siblings, 1 reply; 7+ messages in thread
From: Detlef Vollmann @ 2024-06-14 17:37 UTC (permalink / raw)
  To: gcc Patches, libstdc++; +Cc: gcc-bugzilla

[-- Attachment #1: Type: text/plain, Size: 283 bytes --]

The attached patch fixes 115481 and 111639.
It was tested against avr-libc 2.0.0 (which has *f as macros),
2.1.0 (which has *f as functions, but no long double), and
2.2.0 (which has long double functions).

Only the libstdc++ build was tested, not the resulting library.

   Detlef

[-- Attachment #2: fix-avr-math.patch --]
[-- Type: text/x-patch, Size: 62319 bytes --]

commit 9112ae579f73b249e9515d5ac9ddc3a76b067c39
Author: Detlef Vollmann <dv@vollmann.ch>
Date:   Fri Jun 14 14:34:31 2024 +0200

    libstdc++-v3: detect math functions when using avr-libc and handle macros
    
    Different versions of avr-libc have different definitions of
    math functions:
      - 2.0.0 and earlier have float versions as macros
      - 2.1.0 has float versions as proper functions, but no long double versions
      - 2.2.0 has long double versions
    
    This commit tells configure to always check if these functions are available.
    It also #undef's any macros.
    
    libstdc++-v3/ChangeLog:
    
            * crossconfig.m4 [avr*-*-*]: Add compile-checks for
            float and long double functions.
            * configure: Regenerate.
            * src/c++98/math_stubs_float.cc: #undef any macros.

diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 5645e991af7..17dbae7bd87 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -5080,7 +5080,7 @@ else
     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     since some C++ compilers masquerading as C compilers
     incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
 		       && LARGE_OFF_T % 2147483647 == 1)
 		      ? 1 : -1];
@@ -5126,7 +5126,7 @@ else
     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     since some C++ compilers masquerading as C compilers
     incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
 		       && LARGE_OFF_T % 2147483647 == 1)
 		      ? 1 : -1];
@@ -5150,7 +5150,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     since some C++ compilers masquerading as C compilers
     incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
 		       && LARGE_OFF_T % 2147483647 == 1)
 		      ? 1 : -1];
@@ -5195,7 +5195,7 @@ else
     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     since some C++ compilers masquerading as C compilers
     incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
 		       && LARGE_OFF_T % 2147483647 == 1)
 		      ? 1 : -1];
@@ -5219,7 +5219,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     We can't simply define LARGE_OFF_T to be 9223372036854775807,
     since some C++ compilers masquerading as C compilers
     incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
 		       && LARGE_OFF_T % 2147483647 == 1)
 		      ? 1 : -1];
@@ -28628,51 +28628,2354 @@ case "${host}" in
     ;;
 
   avr*-*-*)
-    $as_echo "#define HAVE_ACOSF 1" >>confdefs.h
 
-    $as_echo "#define HAVE_ASINF 1" >>confdefs.h
 
-    $as_echo "#define HAVE_ATAN2F 1" >>confdefs.h
 
-    $as_echo "#define HAVE_ATANF 1" >>confdefs.h
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acosf declaration" >&5
+$as_echo_n "checking for acosf declaration... " >&6; }
+if ${glibcxx_cv_func_acosf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef acosf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))acosf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_acosf_use=yes
+
+else
+  glibcxx_cv_func_acosf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_acosf_use" >&5
+$as_echo "$glibcxx_cv_func_acosf_use" >&6; }
+  if test "x$glibcxx_cv_func_acosf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_ACOSF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for asinf declaration" >&5
+$as_echo_n "checking for asinf declaration... " >&6; }
+if ${glibcxx_cv_func_asinf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef asinf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))asinf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_asinf_use=yes
+
+else
+  glibcxx_cv_func_asinf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_asinf_use" >&5
+$as_echo "$glibcxx_cv_func_asinf_use" >&6; }
+  if test "x$glibcxx_cv_func_asinf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_ASINF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for atan2f declaration" >&5
+$as_echo_n "checking for atan2f declaration... " >&6; }
+if ${glibcxx_cv_func_atan2f_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef atan2f
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))atan2f;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_atan2f_use=yes
+
+else
+  glibcxx_cv_func_atan2f_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_atan2f_use" >&5
+$as_echo "$glibcxx_cv_func_atan2f_use" >&6; }
+  if test "x$glibcxx_cv_func_atan2f_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_ATAN2F 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for atanf declaration" >&5
+$as_echo_n "checking for atanf declaration... " >&6; }
+if ${glibcxx_cv_func_atanf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef atanf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))atanf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_atanf_use=yes
+
+else
+  glibcxx_cv_func_atanf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_atanf_use" >&5
+$as_echo "$glibcxx_cv_func_atanf_use" >&6; }
+  if test "x$glibcxx_cv_func_atanf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_ATANF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ceilf declaration" >&5
+$as_echo_n "checking for ceilf declaration... " >&6; }
+if ${glibcxx_cv_func_ceilf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef ceilf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))ceilf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_ceilf_use=yes
+
+else
+  glibcxx_cv_func_ceilf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_ceilf_use" >&5
+$as_echo "$glibcxx_cv_func_ceilf_use" >&6; }
+  if test "x$glibcxx_cv_func_ceilf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_CEILF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for coshf declaration" >&5
+$as_echo_n "checking for coshf declaration... " >&6; }
+if ${glibcxx_cv_func_coshf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef coshf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))coshf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_coshf_use=yes
+
+else
+  glibcxx_cv_func_coshf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_coshf_use" >&5
+$as_echo "$glibcxx_cv_func_coshf_use" >&6; }
+  if test "x$glibcxx_cv_func_coshf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_COSHF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cosf declaration" >&5
+$as_echo_n "checking for cosf declaration... " >&6; }
+if ${glibcxx_cv_func_cosf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef cosf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))cosf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_cosf_use=yes
+
+else
+  glibcxx_cv_func_cosf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_cosf_use" >&5
+$as_echo "$glibcxx_cv_func_cosf_use" >&6; }
+  if test "x$glibcxx_cv_func_cosf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_COSF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for expf declaration" >&5
+$as_echo_n "checking for expf declaration... " >&6; }
+if ${glibcxx_cv_func_expf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef expf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))expf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_expf_use=yes
+
+else
+  glibcxx_cv_func_expf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_expf_use" >&5
+$as_echo "$glibcxx_cv_func_expf_use" >&6; }
+  if test "x$glibcxx_cv_func_expf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_EXPF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fabsf declaration" >&5
+$as_echo_n "checking for fabsf declaration... " >&6; }
+if ${glibcxx_cv_func_fabsf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef fabsf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))fabsf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_fabsf_use=yes
+
+else
+  glibcxx_cv_func_fabsf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_fabsf_use" >&5
+$as_echo "$glibcxx_cv_func_fabsf_use" >&6; }
+  if test "x$glibcxx_cv_func_fabsf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_FABSF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for floorf declaration" >&5
+$as_echo_n "checking for floorf declaration... " >&6; }
+if ${glibcxx_cv_func_floorf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef floorf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))floorf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_floorf_use=yes
+
+else
+  glibcxx_cv_func_floorf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_floorf_use" >&5
+$as_echo "$glibcxx_cv_func_floorf_use" >&6; }
+  if test "x$glibcxx_cv_func_floorf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_FLOORF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fmodf declaration" >&5
+$as_echo_n "checking for fmodf declaration... " >&6; }
+if ${glibcxx_cv_func_fmodf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef fmodf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))fmodf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_fmodf_use=yes
+
+else
+  glibcxx_cv_func_fmodf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_fmodf_use" >&5
+$as_echo "$glibcxx_cv_func_fmodf_use" >&6; }
+  if test "x$glibcxx_cv_func_fmodf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_FMODF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for frexpf declaration" >&5
+$as_echo_n "checking for frexpf declaration... " >&6; }
+if ${glibcxx_cv_func_frexpf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef frexpf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))frexpf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_frexpf_use=yes
+
+else
+  glibcxx_cv_func_frexpf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_frexpf_use" >&5
+$as_echo "$glibcxx_cv_func_frexpf_use" >&6; }
+  if test "x$glibcxx_cv_func_frexpf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_FREXPF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hypotf declaration" >&5
+$as_echo_n "checking for hypotf declaration... " >&6; }
+if ${glibcxx_cv_func_hypotf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef hypotf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))hypotf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_hypotf_use=yes
+
+else
+  glibcxx_cv_func_hypotf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_hypotf_use" >&5
+$as_echo "$glibcxx_cv_func_hypotf_use" >&6; }
+  if test "x$glibcxx_cv_func_hypotf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_HYPOTF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldexpf declaration" >&5
+$as_echo_n "checking for ldexpf declaration... " >&6; }
+if ${glibcxx_cv_func_ldexpf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef ldexpf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))ldexpf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_ldexpf_use=yes
+
+else
+  glibcxx_cv_func_ldexpf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_ldexpf_use" >&5
+$as_echo "$glibcxx_cv_func_ldexpf_use" >&6; }
+  if test "x$glibcxx_cv_func_ldexpf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_LDEXPF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for log10f declaration" >&5
+$as_echo_n "checking for log10f declaration... " >&6; }
+if ${glibcxx_cv_func_log10f_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef log10f
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))log10f;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_log10f_use=yes
+
+else
+  glibcxx_cv_func_log10f_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_log10f_use" >&5
+$as_echo "$glibcxx_cv_func_log10f_use" >&6; }
+  if test "x$glibcxx_cv_func_log10f_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_LOG10F 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for logf declaration" >&5
+$as_echo_n "checking for logf declaration... " >&6; }
+if ${glibcxx_cv_func_logf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef logf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))logf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_logf_use=yes
+
+else
+  glibcxx_cv_func_logf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_logf_use" >&5
+$as_echo "$glibcxx_cv_func_logf_use" >&6; }
+  if test "x$glibcxx_cv_func_logf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_LOGF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for modff declaration" >&5
+$as_echo_n "checking for modff declaration... " >&6; }
+if ${glibcxx_cv_func_modff_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef modff
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))modff;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_modff_use=yes
+
+else
+  glibcxx_cv_func_modff_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_modff_use" >&5
+$as_echo "$glibcxx_cv_func_modff_use" >&6; }
+  if test "x$glibcxx_cv_func_modff_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_MODFF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for powf declaration" >&5
+$as_echo_n "checking for powf declaration... " >&6; }
+if ${glibcxx_cv_func_powf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef powf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))powf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_powf_use=yes
+
+else
+  glibcxx_cv_func_powf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_powf_use" >&5
+$as_echo "$glibcxx_cv_func_powf_use" >&6; }
+  if test "x$glibcxx_cv_func_powf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_POWF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sinhf declaration" >&5
+$as_echo_n "checking for sinhf declaration... " >&6; }
+if ${glibcxx_cv_func_sinhf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef sinhf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))sinhf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_sinhf_use=yes
+
+else
+  glibcxx_cv_func_sinhf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_sinhf_use" >&5
+$as_echo "$glibcxx_cv_func_sinhf_use" >&6; }
+  if test "x$glibcxx_cv_func_sinhf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_SINHF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sinf declaration" >&5
+$as_echo_n "checking for sinf declaration... " >&6; }
+if ${glibcxx_cv_func_sinf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef sinf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))sinf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_sinf_use=yes
+
+else
+  glibcxx_cv_func_sinf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_sinf_use" >&5
+$as_echo "$glibcxx_cv_func_sinf_use" >&6; }
+  if test "x$glibcxx_cv_func_sinf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_SINF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrtf declaration" >&5
+$as_echo_n "checking for sqrtf declaration... " >&6; }
+if ${glibcxx_cv_func_sqrtf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef sqrtf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))sqrtf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_sqrtf_use=yes
+
+else
+  glibcxx_cv_func_sqrtf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_sqrtf_use" >&5
+$as_echo "$glibcxx_cv_func_sqrtf_use" >&6; }
+  if test "x$glibcxx_cv_func_sqrtf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_SQRTF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tanhf declaration" >&5
+$as_echo_n "checking for tanhf declaration... " >&6; }
+if ${glibcxx_cv_func_tanhf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef tanhf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))tanhf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_tanhf_use=yes
+
+else
+  glibcxx_cv_func_tanhf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_tanhf_use" >&5
+$as_echo "$glibcxx_cv_func_tanhf_use" >&6; }
+  if test "x$glibcxx_cv_func_tanhf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_TANHF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tanf declaration" >&5
+$as_echo_n "checking for tanf declaration... " >&6; }
+if ${glibcxx_cv_func_tanf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef tanf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))tanf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_tanf_use=yes
+
+else
+  glibcxx_cv_func_tanf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_tanf_use" >&5
+$as_echo "$glibcxx_cv_func_tanf_use" >&6; }
+  if test "x$glibcxx_cv_func_tanf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_TANF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acosl declaration" >&5
+$as_echo_n "checking for acosl declaration... " >&6; }
+if ${glibcxx_cv_func_acosl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef acosl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))acosl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_acosl_use=yes
+
+else
+  glibcxx_cv_func_acosl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_acosl_use" >&5
+$as_echo "$glibcxx_cv_func_acosl_use" >&6; }
+  if test "x$glibcxx_cv_func_acosl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_ACOSL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for asinl declaration" >&5
+$as_echo_n "checking for asinl declaration... " >&6; }
+if ${glibcxx_cv_func_asinl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef asinl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))asinl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_asinl_use=yes
+
+else
+  glibcxx_cv_func_asinl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_asinl_use" >&5
+$as_echo "$glibcxx_cv_func_asinl_use" >&6; }
+  if test "x$glibcxx_cv_func_asinl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_ASINL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for atan2l declaration" >&5
+$as_echo_n "checking for atan2l declaration... " >&6; }
+if ${glibcxx_cv_func_atan2l_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef atan2l
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))atan2l;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_atan2l_use=yes
+
+else
+  glibcxx_cv_func_atan2l_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_atan2l_use" >&5
+$as_echo "$glibcxx_cv_func_atan2l_use" >&6; }
+  if test "x$glibcxx_cv_func_atan2l_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_ATAN2L 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for atanl declaration" >&5
+$as_echo_n "checking for atanl declaration... " >&6; }
+if ${glibcxx_cv_func_atanl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef atanl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))atanl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_atanl_use=yes
+
+else
+  glibcxx_cv_func_atanl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_atanl_use" >&5
+$as_echo "$glibcxx_cv_func_atanl_use" >&6; }
+  if test "x$glibcxx_cv_func_atanl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_ATANL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ceill declaration" >&5
+$as_echo_n "checking for ceill declaration... " >&6; }
+if ${glibcxx_cv_func_ceill_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef ceill
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))ceill;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_ceill_use=yes
+
+else
+  glibcxx_cv_func_ceill_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_ceill_use" >&5
+$as_echo "$glibcxx_cv_func_ceill_use" >&6; }
+  if test "x$glibcxx_cv_func_ceill_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_CEILL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for coshl declaration" >&5
+$as_echo_n "checking for coshl declaration... " >&6; }
+if ${glibcxx_cv_func_coshl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef coshl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))coshl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_coshl_use=yes
+
+else
+  glibcxx_cv_func_coshl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_coshl_use" >&5
+$as_echo "$glibcxx_cv_func_coshl_use" >&6; }
+  if test "x$glibcxx_cv_func_coshl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_COSHL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cosl declaration" >&5
+$as_echo_n "checking for cosl declaration... " >&6; }
+if ${glibcxx_cv_func_cosl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef cosl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))cosl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_cosl_use=yes
+
+else
+  glibcxx_cv_func_cosl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_cosl_use" >&5
+$as_echo "$glibcxx_cv_func_cosl_use" >&6; }
+  if test "x$glibcxx_cv_func_cosl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_COSL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for expl declaration" >&5
+$as_echo_n "checking for expl declaration... " >&6; }
+if ${glibcxx_cv_func_expl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef expl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))expl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_expl_use=yes
+
+else
+  glibcxx_cv_func_expl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_expl_use" >&5
+$as_echo "$glibcxx_cv_func_expl_use" >&6; }
+  if test "x$glibcxx_cv_func_expl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_EXPL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fabsl declaration" >&5
+$as_echo_n "checking for fabsl declaration... " >&6; }
+if ${glibcxx_cv_func_fabsl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef fabsl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))fabsl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_fabsl_use=yes
+
+else
+  glibcxx_cv_func_fabsl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_fabsl_use" >&5
+$as_echo "$glibcxx_cv_func_fabsl_use" >&6; }
+  if test "x$glibcxx_cv_func_fabsl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_FABSL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for floorl declaration" >&5
+$as_echo_n "checking for floorl declaration... " >&6; }
+if ${glibcxx_cv_func_floorl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef floorl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))floorl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_floorl_use=yes
+
+else
+  glibcxx_cv_func_floorl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_floorl_use" >&5
+$as_echo "$glibcxx_cv_func_floorl_use" >&6; }
+  if test "x$glibcxx_cv_func_floorl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_FLOORL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fmodl declaration" >&5
+$as_echo_n "checking for fmodl declaration... " >&6; }
+if ${glibcxx_cv_func_fmodl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef fmodl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))fmodl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_fmodl_use=yes
+
+else
+  glibcxx_cv_func_fmodl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_fmodl_use" >&5
+$as_echo "$glibcxx_cv_func_fmodl_use" >&6; }
+  if test "x$glibcxx_cv_func_fmodl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_FMODL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for frexpl declaration" >&5
+$as_echo_n "checking for frexpl declaration... " >&6; }
+if ${glibcxx_cv_func_frexpl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef frexpl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))frexpl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_frexpl_use=yes
+
+else
+  glibcxx_cv_func_frexpl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_frexpl_use" >&5
+$as_echo "$glibcxx_cv_func_frexpl_use" >&6; }
+  if test "x$glibcxx_cv_func_frexpl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_FREXPL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hypotl declaration" >&5
+$as_echo_n "checking for hypotl declaration... " >&6; }
+if ${glibcxx_cv_func_hypotl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef hypotl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))hypotl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_hypotl_use=yes
+
+else
+  glibcxx_cv_func_hypotl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_hypotl_use" >&5
+$as_echo "$glibcxx_cv_func_hypotl_use" >&6; }
+  if test "x$glibcxx_cv_func_hypotl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_HYPOTL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldexpl declaration" >&5
+$as_echo_n "checking for ldexpl declaration... " >&6; }
+if ${glibcxx_cv_func_ldexpl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef ldexpl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))ldexpl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_ldexpl_use=yes
+
+else
+  glibcxx_cv_func_ldexpl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_ldexpl_use" >&5
+$as_echo "$glibcxx_cv_func_ldexpl_use" >&6; }
+  if test "x$glibcxx_cv_func_ldexpl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_LDEXPL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for log10l declaration" >&5
+$as_echo_n "checking for log10l declaration... " >&6; }
+if ${glibcxx_cv_func_log10l_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef log10l
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))log10l;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_log10l_use=yes
+
+else
+  glibcxx_cv_func_log10l_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_log10l_use" >&5
+$as_echo "$glibcxx_cv_func_log10l_use" >&6; }
+  if test "x$glibcxx_cv_func_log10l_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_LOG10L 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for logl declaration" >&5
+$as_echo_n "checking for logl declaration... " >&6; }
+if ${glibcxx_cv_func_logl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef logl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))logl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_logl_use=yes
+
+else
+  glibcxx_cv_func_logl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_logl_use" >&5
+$as_echo "$glibcxx_cv_func_logl_use" >&6; }
+  if test "x$glibcxx_cv_func_logl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_LOGL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for modfl declaration" >&5
+$as_echo_n "checking for modfl declaration... " >&6; }
+if ${glibcxx_cv_func_modfl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef modfl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))modfl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_modfl_use=yes
+
+else
+  glibcxx_cv_func_modfl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_modfl_use" >&5
+$as_echo "$glibcxx_cv_func_modfl_use" >&6; }
+  if test "x$glibcxx_cv_func_modfl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_MODFL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for powl declaration" >&5
+$as_echo_n "checking for powl declaration... " >&6; }
+if ${glibcxx_cv_func_powl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef powl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))powl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_powl_use=yes
+
+else
+  glibcxx_cv_func_powl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_powl_use" >&5
+$as_echo "$glibcxx_cv_func_powl_use" >&6; }
+  if test "x$glibcxx_cv_func_powl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_POWL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sinhl declaration" >&5
+$as_echo_n "checking for sinhl declaration... " >&6; }
+if ${glibcxx_cv_func_sinhl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
 
-    $as_echo "#define HAVE_CEILF 1" >>confdefs.h
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-    $as_echo "#define HAVE_COSF 1" >>confdefs.h
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-    $as_echo "#define HAVE_COSHF 1" >>confdefs.h
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef sinhl
 
-    $as_echo "#define HAVE_EXPF 1" >>confdefs.h
+int
+main ()
+{
 
-    $as_echo "#define HAVE_FABSF 1" >>confdefs.h
+  void (*f)(void) = (void (*)(void))sinhl;
 
-    $as_echo "#define HAVE_FLOORF 1" >>confdefs.h
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_sinhl_use=yes
 
-    $as_echo "#define HAVE_FMODF 1" >>confdefs.h
+else
+  glibcxx_cv_func_sinhl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_sinhl_use" >&5
+$as_echo "$glibcxx_cv_func_sinhl_use" >&6; }
+  if test "x$glibcxx_cv_func_sinhl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_SINHL 1
+_ACEOF
 
-    $as_echo "#define HAVE_FREXPF 1" >>confdefs.h
+  fi
 
-    $as_echo "#define HAVE_SQRTF 1" >>confdefs.h
 
-    $as_echo "#define HAVE_HYPOTF 1" >>confdefs.h
 
-    $as_echo "#define HAVE_LDEXPF 1" >>confdefs.h
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sinl declaration" >&5
+$as_echo_n "checking for sinl declaration... " >&6; }
+if ${glibcxx_cv_func_sinl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
 
-    $as_echo "#define HAVE_LOG10F 1" >>confdefs.h
 
-    $as_echo "#define HAVE_LOGF 1" >>confdefs.h
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-    $as_echo "#define HAVE_MODFF 1" >>confdefs.h
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-    $as_echo "#define HAVE_POWF 1" >>confdefs.h
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef sinl
 
-    $as_echo "#define HAVE_SINF 1" >>confdefs.h
+int
+main ()
+{
 
-    $as_echo "#define HAVE_SINHF 1" >>confdefs.h
+  void (*f)(void) = (void (*)(void))sinl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_sinl_use=yes
+
+else
+  glibcxx_cv_func_sinl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_sinl_use" >&5
+$as_echo "$glibcxx_cv_func_sinl_use" >&6; }
+  if test "x$glibcxx_cv_func_sinl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_SINL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrtl declaration" >&5
+$as_echo_n "checking for sqrtl declaration... " >&6; }
+if ${glibcxx_cv_func_sqrtl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef sqrtl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))sqrtl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_sqrtl_use=yes
+
+else
+  glibcxx_cv_func_sqrtl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_sqrtl_use" >&5
+$as_echo "$glibcxx_cv_func_sqrtl_use" >&6; }
+  if test "x$glibcxx_cv_func_sqrtl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_SQRTL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tanhl declaration" >&5
+$as_echo_n "checking for tanhl declaration... " >&6; }
+if ${glibcxx_cv_func_tanhl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef tanhl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))tanhl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_tanhl_use=yes
+
+else
+  glibcxx_cv_func_tanhl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_tanhl_use" >&5
+$as_echo "$glibcxx_cv_func_tanhl_use" >&6; }
+  if test "x$glibcxx_cv_func_tanhl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_TANHL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tanl declaration" >&5
+$as_echo_n "checking for tanl declaration... " >&6; }
+if ${glibcxx_cv_func_tanl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef tanl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))tanl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_tanl_use=yes
+
+else
+  glibcxx_cv_func_tanl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_tanl_use" >&5
+$as_echo "$glibcxx_cv_func_tanl_use" >&6; }
+  if test "x$glibcxx_cv_func_tanl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_TANL 1
+_ACEOF
+
+  fi
 
-    $as_echo "#define HAVE_TANF 1" >>confdefs.h
 
-    $as_echo "#define HAVE_TANHF 1" >>confdefs.h
 
     ;;
 
diff --git a/libstdc++-v3/crossconfig.m4 b/libstdc++-v3/crossconfig.m4
index b3269cb88e0..5e1249d0a54 100644
--- a/libstdc++-v3/crossconfig.m4
+++ b/libstdc++-v3/crossconfig.m4
@@ -10,29 +10,16 @@ case "${host}" in
     ;;
 
   avr*-*-*)
-    AC_DEFINE(HAVE_ACOSF)
-    AC_DEFINE(HAVE_ASINF)
-    AC_DEFINE(HAVE_ATAN2F)
-    AC_DEFINE(HAVE_ATANF)
-    AC_DEFINE(HAVE_CEILF)
-    AC_DEFINE(HAVE_COSF)
-    AC_DEFINE(HAVE_COSHF)
-    AC_DEFINE(HAVE_EXPF)
-    AC_DEFINE(HAVE_FABSF)
-    AC_DEFINE(HAVE_FLOORF)
-    AC_DEFINE(HAVE_FMODF)
-    AC_DEFINE(HAVE_FREXPF)
-    AC_DEFINE(HAVE_SQRTF)
-    AC_DEFINE(HAVE_HYPOTF)
-    AC_DEFINE(HAVE_LDEXPF)
-    AC_DEFINE(HAVE_LOG10F)
-    AC_DEFINE(HAVE_LOGF)
-    AC_DEFINE(HAVE_MODFF)
-    AC_DEFINE(HAVE_POWF)
-    AC_DEFINE(HAVE_SINF)
-    AC_DEFINE(HAVE_SINHF)
-    AC_DEFINE(HAVE_TANF)
-    AC_DEFINE(HAVE_TANHF)
+dnl # Correct (non-macro) support for some math functions depends on
+dnl # newlib or avrlibc version.  So test for their availability
+dnl # rather than hardcoding that information.
+    GLIBCXX_CHECK_MATH_DECLS([
+      acosf asinf atan2f atanf ceilf coshf cosf expf fabsf floorf fmodf
+      frexpf hypotf ldexpf log10f logf modff powf sinhf sinf sqrtf
+      tanhf tanf
+      acosl asinl atan2l atanl ceill coshl cosl expl fabsl floorl fmodl
+      frexpl hypotl ldexpl log10l logl modfl powl sinhl sinl sqrtl
+      tanhl tanl])
     ;;
 
   mips*-sde-elf*)
diff --git a/libstdc++-v3/src/c++98/math_stubs_float.cc b/libstdc++-v3/src/c++98/math_stubs_float.cc
index 4dbe3afab8f..537bd4ae64e 100644
--- a/libstdc++-v3/src/c++98/math_stubs_float.cc
+++ b/libstdc++-v3/src/c++98/math_stubs_float.cc
@@ -31,6 +31,7 @@
 extern "C"
 {
 #ifndef _GLIBCXX_HAVE_FABSF
+#undef fabsf
   float
   fabsf(float x)
   {
@@ -39,6 +40,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_ACOSF
+#undef acosf
   float
   acosf(float x)
   {
@@ -47,6 +49,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_ASINF
+#undef asinf
   float
   asinf(float x)
   {
@@ -55,6 +58,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_ATANF
+#undef atanf
   float
   atanf(float x)
   {
@@ -63,6 +67,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_ATAN2F
+#undef atan2f
   float
   atan2f(float x, float y)
   {
@@ -71,6 +76,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_CEILF
+#undef ceilf
   float
   ceilf(float x)
   {
@@ -79,6 +85,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_COSF
+#undef cosf
   float
   cosf(float x)
   {
@@ -87,6 +94,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_COSHF
+#undef coshf
   float
   coshf(float x)
   {
@@ -95,6 +103,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_EXPF
+#undef expf
   float
   expf(float x)
   {
@@ -103,6 +112,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_FLOORF
+#undef floorf
   float
   floorf(float x)
   {
@@ -111,6 +121,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_FMODF
+#undef fmodf
   float
   fmodf(float x, float y)
   {
@@ -119,6 +130,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_FREXPF
+#undef frexpf
   float
   frexpf(float x, int *exp)
   {
@@ -127,6 +139,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_SQRTF
+#undef sqrtf
   float
   sqrtf(float x)
   {
@@ -135,6 +148,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_HYPOTF
+#undef hypotf
   float
   hypotf(float x, float y)
   {
@@ -147,6 +161,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_LDEXPF
+#undef ldexpf
   float
   ldexpf(float x, int exp)
   {
@@ -155,6 +170,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_LOGF
+#undef logf
   float
   logf(float x)
   {
@@ -163,6 +179,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_LOG10F
+#undef log10f
   float
   log10f(float x)
   {
@@ -171,6 +188,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_MODFF
+#undef modff
   float
   modff(float x, float *iptr)
   {
@@ -183,6 +201,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_POWF
+#undef powf
   float
   powf(float x, float y)
   {
@@ -191,6 +210,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_SINF
+#undef sinf
   float
   sinf(float x)
   {
@@ -199,6 +219,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_SINHF
+#undef sinhf
   float
   sinhf(float x)
   {
@@ -207,6 +228,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_TANF
+#undef tanf
   float
   tanf(float x)
   {
@@ -215,6 +237,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_TANHF
+#undef tanhf
   float
   tanhf(float x)
   {

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] libstdc++: Fix build for AVR [PR115481, PR111639]
  2024-06-14 17:37   ` [PATCH] libstdc++: Fix build for AVR [PR115481, PR111639] Detlef Vollmann
@ 2024-06-14 17:45     ` Xi Ruoyao
  2024-06-14 17:59       ` Jonathan Wakely
  2024-06-14 19:11       ` [PATCH] " Detlef Vollmann
  0 siblings, 2 replies; 7+ messages in thread
From: Xi Ruoyao @ 2024-06-14 17:45 UTC (permalink / raw)
  To: Detlef Vollmann, gcc Patches, libstdc++; +Cc: gcc-bugzilla

On Fri, 2024-06-14 at 19:37 +0200, Detlef Vollmann wrote:
> diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
> index 5645e991af7..17dbae7bd87 100755
> --- a/libstdc++-v3/configure
> +++ b/libstdc++-v3/configure
> @@ -5080,7 +5080,7 @@ else
>      We can't simply define LARGE_OFF_T to be 9223372036854775807,
>      since some C++ compilers masquerading as C compilers
>      incorrectly reject 9223372036854775807.  */
> -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
> +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
>    int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
>  		       && LARGE_OFF_T % 2147483647 == 1)
>  		      ? 1 : -1];

This shouldn't happen.  Please regenerate using *vanilla* autoconf-2.69.

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] libstdc++: Fix build for AVR [PR115481, PR111639]
  2024-06-14 17:45     ` Xi Ruoyao
@ 2024-06-14 17:59       ` Jonathan Wakely
  2024-06-18 12:56         ` [PATCH v2] " Detlef Vollmann
  2024-06-14 19:11       ` [PATCH] " Detlef Vollmann
  1 sibling, 1 reply; 7+ messages in thread
From: Jonathan Wakely @ 2024-06-14 17:59 UTC (permalink / raw)
  To: Xi Ruoyao; +Cc: Detlef Vollmann, gcc Patches, libstdc++, gcc-bugzilla

On Fri, 14 Jun 2024 at 18:45, Xi Ruoyao wrote:
>
> On Fri, 2024-06-14 at 19:37 +0200, Detlef Vollmann wrote:
> > diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
> > index 5645e991af7..17dbae7bd87 100755
> > --- a/libstdc++-v3/configure
> > +++ b/libstdc++-v3/configure
> > @@ -5080,7 +5080,7 @@ else
> >      We can't simply define LARGE_OFF_T to be 9223372036854775807,
> >      since some C++ compilers masquerading as C compilers
> >      incorrectly reject 9223372036854775807.  */
> > -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
> > +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
> >    int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
> >                      && LARGE_OFF_T % 2147483647 == 1)
> >                     ? 1 : -1];
>
> This shouldn't happen.  Please regenerate using *vanilla* autoconf-2.69.

Yes, please, if possible. But I can regenerate it locally before
pushing if needed.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] libstdc++: Fix build for AVR [PR115481, PR111639]
  2024-06-14 17:45     ` Xi Ruoyao
  2024-06-14 17:59       ` Jonathan Wakely
@ 2024-06-14 19:11       ` Detlef Vollmann
  2024-06-15  8:30         ` Georg-Johann Lay
  1 sibling, 1 reply; 7+ messages in thread
From: Detlef Vollmann @ 2024-06-14 19:11 UTC (permalink / raw)
  To: Xi Ruoyao, gcc Patches, libstdc++; +Cc: gcc-bugzilla

On 6/14/24 19:45, Xi Ruoyao wrote:
> On Fri, 2024-06-14 at 19:37 +0200, Detlef Vollmann wrote:
>> diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
>> index 5645e991af7..17dbae7bd87 100755
>> --- a/libstdc++-v3/configure
>> +++ b/libstdc++-v3/configure
>> @@ -5080,7 +5080,7 @@ else
>>       We can't simply define LARGE_OFF_T to be 9223372036854775807,
>>       since some C++ compilers masquerading as C compilers
>>       incorrectly reject 9223372036854775807.  */
>> -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
>> +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
>>     int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
>>   		       && LARGE_OFF_T % 2147483647 == 1)
>>   		      ? 1 : -1];
> 
> This shouldn't happen.  Please regenerate using *vanilla* autoconf-2.69.

Sorry, I was surprised myself, when I looked at the changes.
But after looking at the actual change I thought it doesn't matter.
I used Debian's version, I'll try to get a vanilla version working
tomorrow (I actually plan anyway to run a test with the built libstdc++
on simulavr).

   Detlef


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] libstdc++: Fix build for AVR [PR115481, PR111639]
  2024-06-14 19:11       ` [PATCH] " Detlef Vollmann
@ 2024-06-15  8:30         ` Georg-Johann Lay
  2024-06-15 20:28           ` Detlef Vollmann
  0 siblings, 1 reply; 7+ messages in thread
From: Georg-Johann Lay @ 2024-06-15  8:30 UTC (permalink / raw)
  To: Detlef Vollmann, Xi Ruoyao, gcc Patches, libstdc++

Am 14.06.24 um 21:11 schrieb Detlef Vollmann:
> I actually plan anyway to run a test with the built libstdc++ on simulavr.
> 
>    Detlef

As an aside, simulavr tries to simulate an exact match of the hardware
including internal I/O like timers, IRQs, etc.

For GCC regression testing, no internal I/O is needed; all what's
required for testing algorithms is a core simulator like avrtest:

https://github.com/sprintersb/atest

https://github.com/sprintersb/atest?tab=readme-ov-file#running-the-avr-gcc-testsuite-using-the-avrtest-simulator

avrtest runs orders of magnitude faster than simulavr, however it
doesn't implement a GDB server, EEPROM or timers (none of which
is required for the GCC testsuite).

Apart from that, only being a core simulator, you can test for more
cores than covered by simulavr.  simulavr supports devices that cover
the following 8 multilib variants:

avr2
tiny-stack
avr25
avr25/tiny-stack
avr4
avr5
avr51
avr6

out of the 19 variants available in avr-gcc, like avr3, avr31,
avrtiny, and all the avrxmega[2-7] variants that can be used with
avrtest.

avrtest comes with board descriptions that cover a variety
of all the different cores.

avrtest board descriptions usually supply more RAM than the
actual device has, which allows more PASSes due to less
out-of-memory FAILs.


Johann

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] libstdc++: Fix build for AVR [PR115481, PR111639]
  2024-06-15  8:30         ` Georg-Johann Lay
@ 2024-06-15 20:28           ` Detlef Vollmann
  0 siblings, 0 replies; 7+ messages in thread
From: Detlef Vollmann @ 2024-06-15 20:28 UTC (permalink / raw)
  To: Georg-Johann Lay, gcc Patches, libstdc++; +Cc: Jonathan Wakely, Xi Ruoyao

On 6/15/24 10:30, Georg-Johann Lay wrote:
> Am 14.06.24 um 21:11 schrieb Detlef Vollmann:
>> I actually plan anyway to run a test with the built libstdc++ on 
>> simulavr.

> As an aside, simulavr tries to simulate an exact match of the hardware
> including internal I/O like timers, IRQs, etc.
> 
> For GCC regression testing, no internal I/O is needed; all what's
> required for testing algorithms is a core simulator like avrtest:
> 
> https://github.com/sprintersb/atest
> 
> https://github.com/sprintersb/atest?tab=readme-ov-file#running-the-avr-gcc-testsuite-using-the-avrtest-simulator
> 
> avrtest runs orders of magnitude faster than simulavr, however it
> doesn't implement a GDB server, EEPROM or timers (none of which
> is required for the GCC testsuite).

Thanks for the pointer.

> Apart from that, only being a core simulator, you can test for more
> cores than covered by simulavr.  simulavr supports devices that cover
> the following 8 multilib variants:
> 
> avr2
> tiny-stack
> avr25
> avr25/tiny-stack
> avr4
> avr5
> avr51
> avr6
> 
> out of the 19 variants available in avr-gcc, like avr3, avr31,
> avrtiny, and all the avrxmega[2-7] variants that can be used with
> avrtest.

avr-gcc 15 actually has 57 multilib variants (long-double32,
double64 and short-calls versions).

avr-libc 2.2.0 uses -print-multi-lib to build them all,
avr-libc 2.0.0 has only 17 variants hardcoded.

But right now I'm fighting against an ICE in cmath, i.e. so far
any tests of cmath fail...

I'll investigate this tomorrow and decide then what I'll do...

   Detlef


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] libstdc++: Fix build for AVR [PR115481, PR111639]
  2024-06-14 17:59       ` Jonathan Wakely
@ 2024-06-18 12:56         ` Detlef Vollmann
  0 siblings, 0 replies; 7+ messages in thread
From: Detlef Vollmann @ 2024-06-18 12:56 UTC (permalink / raw)
  To: Jonathan Wakely, Xi Ruoyao; +Cc: gcc Patches, libstdc++, gcc-bugzilla

[-- Attachment #1: Type: text/plain, Size: 2919 bytes --]

On 6/14/24 19:59, Jonathan Wakely wrote:
> On Fri, 14 Jun 2024 at 18:45, Xi Ruoyao wrote:
>>
>> On Fri, 2024-06-14 at 19:37 +0200, Detlef Vollmann wrote:
>>> diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
>>> index 5645e991af7..17dbae7bd87 100755
>>> --- a/libstdc++-v3/configure
>>> +++ b/libstdc++-v3/configure
>>> @@ -5080,7 +5080,7 @@ else
>>>       We can't simply define LARGE_OFF_T to be 9223372036854775807,
>>>       since some C++ compilers masquerading as C compilers
>>>       incorrectly reject 9223372036854775807.  */
>>> -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
>>> +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
>>>     int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
>>>                       && LARGE_OFF_T % 2147483647 == 1)
>>>                      ? 1 : -1];
>>
>> This shouldn't happen.  Please regenerate using *vanilla* autoconf-2.69.
> 
> Yes, please, if possible. But I can regenerate it locally before
> pushing if needed.

This version of the patch doesn't have the problem (this was the
easy part :-)

However, my tests show that this is only a partial solution.
But I believe the patch is correct, and it solves the build
problems for libstdc++ for AVR target.

However, at least for avr-libc 2.0.0 (the version that has the
*f functions as macros) it's not a complete patch:
std::sinf etc, and std::sinl etc are not provided
(::sinf and ::sinl are not provided either).
std::sin exists and has overloads for float, double and lon double.

And calling std::sin(float) only works if the call is inlined,
otherwise I get a linker error
".text._ZSt3sinf[_ZSt3sinf]+0x10): undefined reference to `sinf'".

I don't get a similar error for sinl when calling std::sin(long double).
I didn't have time to dig into the build of libstdc++ to find out
what the difference is.

For avr-libc 2.1.0 (that provides real *f functions but no *l)
I still get the error that std::sinl is not provided but none
of the other problems.

For avr-libc 2.2.0 (that provides real *f and *l functions) I don't
get any of the problems above.

But for all three avr-libc versions I get the problem that the
C++ sin(long double) returns a different value than the C sinl
(which is just another linker name for sin):
I don't really know about floating point representations, but
it looks like the C version fills the mantissa for a long double
return with 0, while the C++ version has bits there.
Looking at the implementation in math_stubs_long_double.cc,
which only calls the double version and promotes the return
to long double this looks strange.
But probably libstdc++ is compiled with different flags than
my test program.
And if I convert the long double result back to double I get
the same value as for C, so it's not really wrong, but it's
irritating...

So again, I think my patch helps, but is not a complete solution.

   Detlef

[-- Attachment #2: avr-math.patch --]
[-- Type: text/x-patch, Size: 59877 bytes --]

commit 1e68bbe1da86913820af146ec5294d1ab53d72f7
Author: Detlef Vollmann <dv@vollmann.ch>
Date:   Sat Jun 15 00:19:45 2024 +0200

    libstdc++-v3: detect math functions when using avr-libc and handle macros
    
    Different versions of avr-libc have different definitions of
    math functions:
      - 2.0.0 and earlier have float versions as macros
      - 2.1.0 has float versions as proper functions, but no long double versions
      - 2.2.0 has long double versions
    
    This commit tells configure to always check if these functions are available.
    It also #undef's any macros.
    
    libstdc++-v3/ChangeLog:
    
            * crossconfig.m4 [avr*-*-*]: Add compile-checks for
            float and long double functions.
            * configure: Regenerate.
            * src/c++98/math_stubs_float.cc: #undef any macros.

diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 5645e991af7..891a5f8e053 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -28628,51 +28628,2354 @@ case "${host}" in
     ;;
 
   avr*-*-*)
-    $as_echo "#define HAVE_ACOSF 1" >>confdefs.h
 
-    $as_echo "#define HAVE_ASINF 1" >>confdefs.h
 
-    $as_echo "#define HAVE_ATAN2F 1" >>confdefs.h
 
-    $as_echo "#define HAVE_ATANF 1" >>confdefs.h
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acosf declaration" >&5
+$as_echo_n "checking for acosf declaration... " >&6; }
+if ${glibcxx_cv_func_acosf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef acosf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))acosf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_acosf_use=yes
+
+else
+  glibcxx_cv_func_acosf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_acosf_use" >&5
+$as_echo "$glibcxx_cv_func_acosf_use" >&6; }
+  if test "x$glibcxx_cv_func_acosf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_ACOSF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for asinf declaration" >&5
+$as_echo_n "checking for asinf declaration... " >&6; }
+if ${glibcxx_cv_func_asinf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef asinf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))asinf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_asinf_use=yes
+
+else
+  glibcxx_cv_func_asinf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_asinf_use" >&5
+$as_echo "$glibcxx_cv_func_asinf_use" >&6; }
+  if test "x$glibcxx_cv_func_asinf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_ASINF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for atan2f declaration" >&5
+$as_echo_n "checking for atan2f declaration... " >&6; }
+if ${glibcxx_cv_func_atan2f_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef atan2f
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))atan2f;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_atan2f_use=yes
+
+else
+  glibcxx_cv_func_atan2f_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_atan2f_use" >&5
+$as_echo "$glibcxx_cv_func_atan2f_use" >&6; }
+  if test "x$glibcxx_cv_func_atan2f_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_ATAN2F 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for atanf declaration" >&5
+$as_echo_n "checking for atanf declaration... " >&6; }
+if ${glibcxx_cv_func_atanf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef atanf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))atanf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_atanf_use=yes
+
+else
+  glibcxx_cv_func_atanf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_atanf_use" >&5
+$as_echo "$glibcxx_cv_func_atanf_use" >&6; }
+  if test "x$glibcxx_cv_func_atanf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_ATANF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ceilf declaration" >&5
+$as_echo_n "checking for ceilf declaration... " >&6; }
+if ${glibcxx_cv_func_ceilf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef ceilf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))ceilf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_ceilf_use=yes
+
+else
+  glibcxx_cv_func_ceilf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_ceilf_use" >&5
+$as_echo "$glibcxx_cv_func_ceilf_use" >&6; }
+  if test "x$glibcxx_cv_func_ceilf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_CEILF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for coshf declaration" >&5
+$as_echo_n "checking for coshf declaration... " >&6; }
+if ${glibcxx_cv_func_coshf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef coshf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))coshf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_coshf_use=yes
+
+else
+  glibcxx_cv_func_coshf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_coshf_use" >&5
+$as_echo "$glibcxx_cv_func_coshf_use" >&6; }
+  if test "x$glibcxx_cv_func_coshf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_COSHF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cosf declaration" >&5
+$as_echo_n "checking for cosf declaration... " >&6; }
+if ${glibcxx_cv_func_cosf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef cosf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))cosf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_cosf_use=yes
+
+else
+  glibcxx_cv_func_cosf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_cosf_use" >&5
+$as_echo "$glibcxx_cv_func_cosf_use" >&6; }
+  if test "x$glibcxx_cv_func_cosf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_COSF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for expf declaration" >&5
+$as_echo_n "checking for expf declaration... " >&6; }
+if ${glibcxx_cv_func_expf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef expf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))expf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_expf_use=yes
+
+else
+  glibcxx_cv_func_expf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_expf_use" >&5
+$as_echo "$glibcxx_cv_func_expf_use" >&6; }
+  if test "x$glibcxx_cv_func_expf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_EXPF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fabsf declaration" >&5
+$as_echo_n "checking for fabsf declaration... " >&6; }
+if ${glibcxx_cv_func_fabsf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef fabsf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))fabsf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_fabsf_use=yes
+
+else
+  glibcxx_cv_func_fabsf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_fabsf_use" >&5
+$as_echo "$glibcxx_cv_func_fabsf_use" >&6; }
+  if test "x$glibcxx_cv_func_fabsf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_FABSF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for floorf declaration" >&5
+$as_echo_n "checking for floorf declaration... " >&6; }
+if ${glibcxx_cv_func_floorf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef floorf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))floorf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_floorf_use=yes
+
+else
+  glibcxx_cv_func_floorf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_floorf_use" >&5
+$as_echo "$glibcxx_cv_func_floorf_use" >&6; }
+  if test "x$glibcxx_cv_func_floorf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_FLOORF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fmodf declaration" >&5
+$as_echo_n "checking for fmodf declaration... " >&6; }
+if ${glibcxx_cv_func_fmodf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef fmodf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))fmodf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_fmodf_use=yes
+
+else
+  glibcxx_cv_func_fmodf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_fmodf_use" >&5
+$as_echo "$glibcxx_cv_func_fmodf_use" >&6; }
+  if test "x$glibcxx_cv_func_fmodf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_FMODF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for frexpf declaration" >&5
+$as_echo_n "checking for frexpf declaration... " >&6; }
+if ${glibcxx_cv_func_frexpf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef frexpf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))frexpf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_frexpf_use=yes
+
+else
+  glibcxx_cv_func_frexpf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_frexpf_use" >&5
+$as_echo "$glibcxx_cv_func_frexpf_use" >&6; }
+  if test "x$glibcxx_cv_func_frexpf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_FREXPF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hypotf declaration" >&5
+$as_echo_n "checking for hypotf declaration... " >&6; }
+if ${glibcxx_cv_func_hypotf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef hypotf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))hypotf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_hypotf_use=yes
+
+else
+  glibcxx_cv_func_hypotf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_hypotf_use" >&5
+$as_echo "$glibcxx_cv_func_hypotf_use" >&6; }
+  if test "x$glibcxx_cv_func_hypotf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_HYPOTF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldexpf declaration" >&5
+$as_echo_n "checking for ldexpf declaration... " >&6; }
+if ${glibcxx_cv_func_ldexpf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef ldexpf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))ldexpf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_ldexpf_use=yes
+
+else
+  glibcxx_cv_func_ldexpf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_ldexpf_use" >&5
+$as_echo "$glibcxx_cv_func_ldexpf_use" >&6; }
+  if test "x$glibcxx_cv_func_ldexpf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_LDEXPF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for log10f declaration" >&5
+$as_echo_n "checking for log10f declaration... " >&6; }
+if ${glibcxx_cv_func_log10f_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef log10f
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))log10f;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_log10f_use=yes
+
+else
+  glibcxx_cv_func_log10f_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_log10f_use" >&5
+$as_echo "$glibcxx_cv_func_log10f_use" >&6; }
+  if test "x$glibcxx_cv_func_log10f_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_LOG10F 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for logf declaration" >&5
+$as_echo_n "checking for logf declaration... " >&6; }
+if ${glibcxx_cv_func_logf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef logf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))logf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_logf_use=yes
+
+else
+  glibcxx_cv_func_logf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_logf_use" >&5
+$as_echo "$glibcxx_cv_func_logf_use" >&6; }
+  if test "x$glibcxx_cv_func_logf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_LOGF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for modff declaration" >&5
+$as_echo_n "checking for modff declaration... " >&6; }
+if ${glibcxx_cv_func_modff_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef modff
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))modff;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_modff_use=yes
+
+else
+  glibcxx_cv_func_modff_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_modff_use" >&5
+$as_echo "$glibcxx_cv_func_modff_use" >&6; }
+  if test "x$glibcxx_cv_func_modff_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_MODFF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for powf declaration" >&5
+$as_echo_n "checking for powf declaration... " >&6; }
+if ${glibcxx_cv_func_powf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef powf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))powf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_powf_use=yes
+
+else
+  glibcxx_cv_func_powf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_powf_use" >&5
+$as_echo "$glibcxx_cv_func_powf_use" >&6; }
+  if test "x$glibcxx_cv_func_powf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_POWF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sinhf declaration" >&5
+$as_echo_n "checking for sinhf declaration... " >&6; }
+if ${glibcxx_cv_func_sinhf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef sinhf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))sinhf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_sinhf_use=yes
+
+else
+  glibcxx_cv_func_sinhf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_sinhf_use" >&5
+$as_echo "$glibcxx_cv_func_sinhf_use" >&6; }
+  if test "x$glibcxx_cv_func_sinhf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_SINHF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sinf declaration" >&5
+$as_echo_n "checking for sinf declaration... " >&6; }
+if ${glibcxx_cv_func_sinf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef sinf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))sinf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_sinf_use=yes
+
+else
+  glibcxx_cv_func_sinf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_sinf_use" >&5
+$as_echo "$glibcxx_cv_func_sinf_use" >&6; }
+  if test "x$glibcxx_cv_func_sinf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_SINF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrtf declaration" >&5
+$as_echo_n "checking for sqrtf declaration... " >&6; }
+if ${glibcxx_cv_func_sqrtf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef sqrtf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))sqrtf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_sqrtf_use=yes
+
+else
+  glibcxx_cv_func_sqrtf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_sqrtf_use" >&5
+$as_echo "$glibcxx_cv_func_sqrtf_use" >&6; }
+  if test "x$glibcxx_cv_func_sqrtf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_SQRTF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tanhf declaration" >&5
+$as_echo_n "checking for tanhf declaration... " >&6; }
+if ${glibcxx_cv_func_tanhf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef tanhf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))tanhf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_tanhf_use=yes
+
+else
+  glibcxx_cv_func_tanhf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_tanhf_use" >&5
+$as_echo "$glibcxx_cv_func_tanhf_use" >&6; }
+  if test "x$glibcxx_cv_func_tanhf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_TANHF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tanf declaration" >&5
+$as_echo_n "checking for tanf declaration... " >&6; }
+if ${glibcxx_cv_func_tanf_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef tanf
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))tanf;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_tanf_use=yes
+
+else
+  glibcxx_cv_func_tanf_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_tanf_use" >&5
+$as_echo "$glibcxx_cv_func_tanf_use" >&6; }
+  if test "x$glibcxx_cv_func_tanf_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_TANF 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for acosl declaration" >&5
+$as_echo_n "checking for acosl declaration... " >&6; }
+if ${glibcxx_cv_func_acosl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef acosl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))acosl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_acosl_use=yes
+
+else
+  glibcxx_cv_func_acosl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_acosl_use" >&5
+$as_echo "$glibcxx_cv_func_acosl_use" >&6; }
+  if test "x$glibcxx_cv_func_acosl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_ACOSL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for asinl declaration" >&5
+$as_echo_n "checking for asinl declaration... " >&6; }
+if ${glibcxx_cv_func_asinl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef asinl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))asinl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_asinl_use=yes
+
+else
+  glibcxx_cv_func_asinl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_asinl_use" >&5
+$as_echo "$glibcxx_cv_func_asinl_use" >&6; }
+  if test "x$glibcxx_cv_func_asinl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_ASINL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for atan2l declaration" >&5
+$as_echo_n "checking for atan2l declaration... " >&6; }
+if ${glibcxx_cv_func_atan2l_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef atan2l
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))atan2l;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_atan2l_use=yes
+
+else
+  glibcxx_cv_func_atan2l_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_atan2l_use" >&5
+$as_echo "$glibcxx_cv_func_atan2l_use" >&6; }
+  if test "x$glibcxx_cv_func_atan2l_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_ATAN2L 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for atanl declaration" >&5
+$as_echo_n "checking for atanl declaration... " >&6; }
+if ${glibcxx_cv_func_atanl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef atanl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))atanl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_atanl_use=yes
+
+else
+  glibcxx_cv_func_atanl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_atanl_use" >&5
+$as_echo "$glibcxx_cv_func_atanl_use" >&6; }
+  if test "x$glibcxx_cv_func_atanl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_ATANL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ceill declaration" >&5
+$as_echo_n "checking for ceill declaration... " >&6; }
+if ${glibcxx_cv_func_ceill_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef ceill
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))ceill;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_ceill_use=yes
+
+else
+  glibcxx_cv_func_ceill_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_ceill_use" >&5
+$as_echo "$glibcxx_cv_func_ceill_use" >&6; }
+  if test "x$glibcxx_cv_func_ceill_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_CEILL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for coshl declaration" >&5
+$as_echo_n "checking for coshl declaration... " >&6; }
+if ${glibcxx_cv_func_coshl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef coshl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))coshl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_coshl_use=yes
+
+else
+  glibcxx_cv_func_coshl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_coshl_use" >&5
+$as_echo "$glibcxx_cv_func_coshl_use" >&6; }
+  if test "x$glibcxx_cv_func_coshl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_COSHL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cosl declaration" >&5
+$as_echo_n "checking for cosl declaration... " >&6; }
+if ${glibcxx_cv_func_cosl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef cosl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))cosl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_cosl_use=yes
+
+else
+  glibcxx_cv_func_cosl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_cosl_use" >&5
+$as_echo "$glibcxx_cv_func_cosl_use" >&6; }
+  if test "x$glibcxx_cv_func_cosl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_COSL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for expl declaration" >&5
+$as_echo_n "checking for expl declaration... " >&6; }
+if ${glibcxx_cv_func_expl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef expl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))expl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_expl_use=yes
+
+else
+  glibcxx_cv_func_expl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_expl_use" >&5
+$as_echo "$glibcxx_cv_func_expl_use" >&6; }
+  if test "x$glibcxx_cv_func_expl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_EXPL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fabsl declaration" >&5
+$as_echo_n "checking for fabsl declaration... " >&6; }
+if ${glibcxx_cv_func_fabsl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef fabsl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))fabsl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_fabsl_use=yes
+
+else
+  glibcxx_cv_func_fabsl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_fabsl_use" >&5
+$as_echo "$glibcxx_cv_func_fabsl_use" >&6; }
+  if test "x$glibcxx_cv_func_fabsl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_FABSL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for floorl declaration" >&5
+$as_echo_n "checking for floorl declaration... " >&6; }
+if ${glibcxx_cv_func_floorl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef floorl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))floorl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_floorl_use=yes
+
+else
+  glibcxx_cv_func_floorl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_floorl_use" >&5
+$as_echo "$glibcxx_cv_func_floorl_use" >&6; }
+  if test "x$glibcxx_cv_func_floorl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_FLOORL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fmodl declaration" >&5
+$as_echo_n "checking for fmodl declaration... " >&6; }
+if ${glibcxx_cv_func_fmodl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef fmodl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))fmodl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_fmodl_use=yes
+
+else
+  glibcxx_cv_func_fmodl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_fmodl_use" >&5
+$as_echo "$glibcxx_cv_func_fmodl_use" >&6; }
+  if test "x$glibcxx_cv_func_fmodl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_FMODL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for frexpl declaration" >&5
+$as_echo_n "checking for frexpl declaration... " >&6; }
+if ${glibcxx_cv_func_frexpl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef frexpl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))frexpl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_frexpl_use=yes
+
+else
+  glibcxx_cv_func_frexpl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_frexpl_use" >&5
+$as_echo "$glibcxx_cv_func_frexpl_use" >&6; }
+  if test "x$glibcxx_cv_func_frexpl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_FREXPL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hypotl declaration" >&5
+$as_echo_n "checking for hypotl declaration... " >&6; }
+if ${glibcxx_cv_func_hypotl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef hypotl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))hypotl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_hypotl_use=yes
+
+else
+  glibcxx_cv_func_hypotl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_hypotl_use" >&5
+$as_echo "$glibcxx_cv_func_hypotl_use" >&6; }
+  if test "x$glibcxx_cv_func_hypotl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_HYPOTL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldexpl declaration" >&5
+$as_echo_n "checking for ldexpl declaration... " >&6; }
+if ${glibcxx_cv_func_ldexpl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef ldexpl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))ldexpl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_ldexpl_use=yes
+
+else
+  glibcxx_cv_func_ldexpl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_ldexpl_use" >&5
+$as_echo "$glibcxx_cv_func_ldexpl_use" >&6; }
+  if test "x$glibcxx_cv_func_ldexpl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_LDEXPL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for log10l declaration" >&5
+$as_echo_n "checking for log10l declaration... " >&6; }
+if ${glibcxx_cv_func_log10l_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef log10l
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))log10l;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_log10l_use=yes
+
+else
+  glibcxx_cv_func_log10l_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_log10l_use" >&5
+$as_echo "$glibcxx_cv_func_log10l_use" >&6; }
+  if test "x$glibcxx_cv_func_log10l_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_LOG10L 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for logl declaration" >&5
+$as_echo_n "checking for logl declaration... " >&6; }
+if ${glibcxx_cv_func_logl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef logl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))logl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_logl_use=yes
+
+else
+  glibcxx_cv_func_logl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_logl_use" >&5
+$as_echo "$glibcxx_cv_func_logl_use" >&6; }
+  if test "x$glibcxx_cv_func_logl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_LOGL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for modfl declaration" >&5
+$as_echo_n "checking for modfl declaration... " >&6; }
+if ${glibcxx_cv_func_modfl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef modfl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))modfl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_modfl_use=yes
+
+else
+  glibcxx_cv_func_modfl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_modfl_use" >&5
+$as_echo "$glibcxx_cv_func_modfl_use" >&6; }
+  if test "x$glibcxx_cv_func_modfl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_MODFL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for powl declaration" >&5
+$as_echo_n "checking for powl declaration... " >&6; }
+if ${glibcxx_cv_func_powl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef powl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))powl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_powl_use=yes
+
+else
+  glibcxx_cv_func_powl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_powl_use" >&5
+$as_echo "$glibcxx_cv_func_powl_use" >&6; }
+  if test "x$glibcxx_cv_func_powl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_POWL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sinhl declaration" >&5
+$as_echo_n "checking for sinhl declaration... " >&6; }
+if ${glibcxx_cv_func_sinhl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
 
-    $as_echo "#define HAVE_CEILF 1" >>confdefs.h
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-    $as_echo "#define HAVE_COSF 1" >>confdefs.h
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-    $as_echo "#define HAVE_COSHF 1" >>confdefs.h
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef sinhl
 
-    $as_echo "#define HAVE_EXPF 1" >>confdefs.h
+int
+main ()
+{
 
-    $as_echo "#define HAVE_FABSF 1" >>confdefs.h
+  void (*f)(void) = (void (*)(void))sinhl;
 
-    $as_echo "#define HAVE_FLOORF 1" >>confdefs.h
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_sinhl_use=yes
 
-    $as_echo "#define HAVE_FMODF 1" >>confdefs.h
+else
+  glibcxx_cv_func_sinhl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_sinhl_use" >&5
+$as_echo "$glibcxx_cv_func_sinhl_use" >&6; }
+  if test "x$glibcxx_cv_func_sinhl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_SINHL 1
+_ACEOF
 
-    $as_echo "#define HAVE_FREXPF 1" >>confdefs.h
+  fi
 
-    $as_echo "#define HAVE_SQRTF 1" >>confdefs.h
 
-    $as_echo "#define HAVE_HYPOTF 1" >>confdefs.h
 
-    $as_echo "#define HAVE_LDEXPF 1" >>confdefs.h
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sinl declaration" >&5
+$as_echo_n "checking for sinl declaration... " >&6; }
+if ${glibcxx_cv_func_sinl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
 
-    $as_echo "#define HAVE_LOG10F 1" >>confdefs.h
 
-    $as_echo "#define HAVE_LOGF 1" >>confdefs.h
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-    $as_echo "#define HAVE_MODFF 1" >>confdefs.h
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
-    $as_echo "#define HAVE_POWF 1" >>confdefs.h
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef sinl
 
-    $as_echo "#define HAVE_SINF 1" >>confdefs.h
+int
+main ()
+{
 
-    $as_echo "#define HAVE_SINHF 1" >>confdefs.h
+  void (*f)(void) = (void (*)(void))sinl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_sinl_use=yes
+
+else
+  glibcxx_cv_func_sinl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_sinl_use" >&5
+$as_echo "$glibcxx_cv_func_sinl_use" >&6; }
+  if test "x$glibcxx_cv_func_sinl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_SINL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrtl declaration" >&5
+$as_echo_n "checking for sqrtl declaration... " >&6; }
+if ${glibcxx_cv_func_sqrtl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef sqrtl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))sqrtl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_sqrtl_use=yes
+
+else
+  glibcxx_cv_func_sqrtl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_sqrtl_use" >&5
+$as_echo "$glibcxx_cv_func_sqrtl_use" >&6; }
+  if test "x$glibcxx_cv_func_sqrtl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_SQRTL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tanhl declaration" >&5
+$as_echo_n "checking for tanhl declaration... " >&6; }
+if ${glibcxx_cv_func_tanhl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef tanhl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))tanhl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_tanhl_use=yes
+
+else
+  glibcxx_cv_func_tanhl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_tanhl_use" >&5
+$as_echo "$glibcxx_cv_func_tanhl_use" >&6; }
+  if test "x$glibcxx_cv_func_tanhl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_TANHL 1
+_ACEOF
+
+  fi
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tanl declaration" >&5
+$as_echo_n "checking for tanl declaration... " >&6; }
+if ${glibcxx_cv_func_tanl_use+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+
+      ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <math.h>
+#ifdef HAVE_IEEEFP_H
+# include <ieeefp.h>
+#endif
+#undef tanl
+
+int
+main ()
+{
+
+  void (*f)(void) = (void (*)(void))tanl;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  glibcxx_cv_func_tanl_use=yes
+
+else
+  glibcxx_cv_func_tanl_use=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_func_tanl_use" >&5
+$as_echo "$glibcxx_cv_func_tanl_use" >&6; }
+  if test "x$glibcxx_cv_func_tanl_use" = xyes; then
+    cat >>confdefs.h <<_ACEOF
+#define HAVE_TANL 1
+_ACEOF
+
+  fi
 
-    $as_echo "#define HAVE_TANF 1" >>confdefs.h
 
-    $as_echo "#define HAVE_TANHF 1" >>confdefs.h
 
     ;;
 
diff --git a/libstdc++-v3/crossconfig.m4 b/libstdc++-v3/crossconfig.m4
index b3269cb88e0..5e1249d0a54 100644
--- a/libstdc++-v3/crossconfig.m4
+++ b/libstdc++-v3/crossconfig.m4
@@ -10,29 +10,16 @@ case "${host}" in
     ;;
 
   avr*-*-*)
-    AC_DEFINE(HAVE_ACOSF)
-    AC_DEFINE(HAVE_ASINF)
-    AC_DEFINE(HAVE_ATAN2F)
-    AC_DEFINE(HAVE_ATANF)
-    AC_DEFINE(HAVE_CEILF)
-    AC_DEFINE(HAVE_COSF)
-    AC_DEFINE(HAVE_COSHF)
-    AC_DEFINE(HAVE_EXPF)
-    AC_DEFINE(HAVE_FABSF)
-    AC_DEFINE(HAVE_FLOORF)
-    AC_DEFINE(HAVE_FMODF)
-    AC_DEFINE(HAVE_FREXPF)
-    AC_DEFINE(HAVE_SQRTF)
-    AC_DEFINE(HAVE_HYPOTF)
-    AC_DEFINE(HAVE_LDEXPF)
-    AC_DEFINE(HAVE_LOG10F)
-    AC_DEFINE(HAVE_LOGF)
-    AC_DEFINE(HAVE_MODFF)
-    AC_DEFINE(HAVE_POWF)
-    AC_DEFINE(HAVE_SINF)
-    AC_DEFINE(HAVE_SINHF)
-    AC_DEFINE(HAVE_TANF)
-    AC_DEFINE(HAVE_TANHF)
+dnl # Correct (non-macro) support for some math functions depends on
+dnl # newlib or avrlibc version.  So test for their availability
+dnl # rather than hardcoding that information.
+    GLIBCXX_CHECK_MATH_DECLS([
+      acosf asinf atan2f atanf ceilf coshf cosf expf fabsf floorf fmodf
+      frexpf hypotf ldexpf log10f logf modff powf sinhf sinf sqrtf
+      tanhf tanf
+      acosl asinl atan2l atanl ceill coshl cosl expl fabsl floorl fmodl
+      frexpl hypotl ldexpl log10l logl modfl powl sinhl sinl sqrtl
+      tanhl tanl])
     ;;
 
   mips*-sde-elf*)
diff --git a/libstdc++-v3/src/c++98/math_stubs_float.cc b/libstdc++-v3/src/c++98/math_stubs_float.cc
index 4dbe3afab8f..537bd4ae64e 100644
--- a/libstdc++-v3/src/c++98/math_stubs_float.cc
+++ b/libstdc++-v3/src/c++98/math_stubs_float.cc
@@ -31,6 +31,7 @@
 extern "C"
 {
 #ifndef _GLIBCXX_HAVE_FABSF
+#undef fabsf
   float
   fabsf(float x)
   {
@@ -39,6 +40,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_ACOSF
+#undef acosf
   float
   acosf(float x)
   {
@@ -47,6 +49,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_ASINF
+#undef asinf
   float
   asinf(float x)
   {
@@ -55,6 +58,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_ATANF
+#undef atanf
   float
   atanf(float x)
   {
@@ -63,6 +67,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_ATAN2F
+#undef atan2f
   float
   atan2f(float x, float y)
   {
@@ -71,6 +76,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_CEILF
+#undef ceilf
   float
   ceilf(float x)
   {
@@ -79,6 +85,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_COSF
+#undef cosf
   float
   cosf(float x)
   {
@@ -87,6 +94,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_COSHF
+#undef coshf
   float
   coshf(float x)
   {
@@ -95,6 +103,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_EXPF
+#undef expf
   float
   expf(float x)
   {
@@ -103,6 +112,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_FLOORF
+#undef floorf
   float
   floorf(float x)
   {
@@ -111,6 +121,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_FMODF
+#undef fmodf
   float
   fmodf(float x, float y)
   {
@@ -119,6 +130,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_FREXPF
+#undef frexpf
   float
   frexpf(float x, int *exp)
   {
@@ -127,6 +139,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_SQRTF
+#undef sqrtf
   float
   sqrtf(float x)
   {
@@ -135,6 +148,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_HYPOTF
+#undef hypotf
   float
   hypotf(float x, float y)
   {
@@ -147,6 +161,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_LDEXPF
+#undef ldexpf
   float
   ldexpf(float x, int exp)
   {
@@ -155,6 +170,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_LOGF
+#undef logf
   float
   logf(float x)
   {
@@ -163,6 +179,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_LOG10F
+#undef log10f
   float
   log10f(float x)
   {
@@ -171,6 +188,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_MODFF
+#undef modff
   float
   modff(float x, float *iptr)
   {
@@ -183,6 +201,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_POWF
+#undef powf
   float
   powf(float x, float y)
   {
@@ -191,6 +210,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_SINF
+#undef sinf
   float
   sinf(float x)
   {
@@ -199,6 +219,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_SINHF
+#undef sinhf
   float
   sinhf(float x)
   {
@@ -207,6 +228,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_TANF
+#undef tanf
   float
   tanf(float x)
   {
@@ -215,6 +237,7 @@ extern "C"
 #endif
 
 #ifndef _GLIBCXX_HAVE_TANHF
+#undef tanhf
   float
   tanhf(float x)
   {

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-06-18 12:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-115481-3249@http.gcc.gnu.org/bugzilla/>
     [not found] ` <bug-115481-3249-15VyLpgmpe@http.gcc.gnu.org/bugzilla/>
2024-06-14 17:37   ` [PATCH] libstdc++: Fix build for AVR [PR115481, PR111639] Detlef Vollmann
2024-06-14 17:45     ` Xi Ruoyao
2024-06-14 17:59       ` Jonathan Wakely
2024-06-18 12:56         ` [PATCH v2] " Detlef Vollmann
2024-06-14 19:11       ` [PATCH] " Detlef Vollmann
2024-06-15  8:30         ` Georg-Johann Lay
2024-06-15 20:28           ` Detlef Vollmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).