Generate config.h macros for IEEE128 math functions.

libgfortran/ChangeLog:

	* acinclude.m4 (LIBGFOR_CHECK_MATH_IEEE128): New macro.
	* configure.ac: Use it.
	* config.h.in: Regenerate.
	* configure: Regenerate.
This commit is contained in:
Thomas Koenig 2021-12-12 12:59:18 +01:00 committed by Jakub Jelinek
parent 8e1339272f
commit 6f4977fc8e
4 changed files with 1047 additions and 0 deletions

View file

@ -510,3 +510,26 @@ AC_DEFUN([LIBGFOR_CHECK_AVX128], [
[AM_CONDITIONAL([HAVE_AVX128],false)])
CFLAGS="$ac_save_CFLAGS"
])
AC_DEFUN([LIBGFOR_CHECK_MATH_IEEE128],
[
AC_REQUIRE([GCC_CHECK_LIBM])
AC_REQUIRE([GCC_CHECK_MATH_HEADERS])
AC_CACHE_CHECK([for $1], [gcc_cv_math_func_$1],
[AC_LINK_IFELSE([AC_LANG_SOURCE([
__float128 $1 (__float128);
__float128 (*ptr)(__float128) = $1;
int
main ()
{
return 0;
}
])],
[gcc_cv_math_func_$1=yes],
[gcc_cv_math_func_$1=no])])
if test $gcc_cv_math_func_$1 = yes; then
AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_$1),[1],
[Define to 1 if you have the `$1' function.])
fi
])

View file

@ -888,9 +888,75 @@
/* Define to 1 if you have the `ynl' function. */
#undef HAVE_YNL
/* Define to 1 if you have the `__acoshieee128' function. */
#undef HAVE___ACOSHIEEE128
/* Define to 1 if you have the `__acosieee128' function. */
#undef HAVE___ACOSIEEE128
/* Define to 1 if you have the `__asinhieee128' function. */
#undef HAVE___ASINHIEEE128
/* Define to 1 if you have the `__asinieee128' function. */
#undef HAVE___ASINIEEE128
/* Define to 1 if you have the `__atan2ieee128' function. */
#undef HAVE___ATAN2IEEE128
/* Define to 1 if you have the `__atanhieee128' function. */
#undef HAVE___ATANHIEEE128
/* Define to 1 if you have the `__atanieee128' function. */
#undef HAVE___ATANIEEE128
/* Define to 1 if you have the `__coshieee128' function. */
#undef HAVE___COSHIEEE128
/* Define to 1 if you have the `__cosieee128' function. */
#undef HAVE___COSIEEE128
/* Define to 1 if you have the `__erfieee128' function. */
#undef HAVE___ERFIEEE128
/* Define to 1 if you have the `__expieee128' function. */
#undef HAVE___EXPIEEE128
/* Define to 1 if you have the `__fabsieee128' function. */
#undef HAVE___FABSIEEE128
/* Define to 1 if you have the `__jnieee128' function. */
#undef HAVE___JNIEEE128
/* Define to 1 if you have the `__log10ieee128' function. */
#undef HAVE___LOG10IEEE128
/* Define to 1 if you have the `__logieee128' function. */
#undef HAVE___LOGIEEE128
/* Define to 1 if you have the `__powieee128' function. */
#undef HAVE___POWIEEE128
/* Define to 1 if you have the `__secure_getenv' function. */
#undef HAVE___SECURE_GETENV
/* Define to 1 if you have the `__sinhieee128' function. */
#undef HAVE___SINHIEEE128
/* Define to 1 if you have the `__sinieee128' function. */
#undef HAVE___SINIEEE128
/* Define to 1 if you have the `__sqrtieee128' function. */
#undef HAVE___SQRTIEEE128
/* Define to 1 if you have the `__tanhieee128' function. */
#undef HAVE___TANHIEEE128
/* Define to 1 if you have the `__tanieee128' function. */
#undef HAVE___TANIEEE128
/* Define to 1 if you have the `__ynieee128' function. */
#undef HAVE___YNIEEE128
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR

930
libgfortran/configure vendored
View file

@ -6032,6 +6032,7 @@ else
HAVE_REAL_17_FALSE=
fi
# Add CET specific flags if CET is enabled
# Check whether --enable-cet was given.
if test "${enable_cet+set}" = set; then :
@ -25833,6 +25834,935 @@ _ACEOF
fi
# For POWER, check the ieee128 math functions
if test "x$have_real_17" = "xyes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __acoshieee128" >&5
$as_echo_n "checking for __acoshieee128... " >&6; }
if ${gcc_cv_math_func___acoshieee128+:} false; then :
$as_echo_n "(cached) " >&6
else
if test x$gcc_no_link = xyes; then
as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
__float128 __acoshieee128 (__float128);
__float128 (*ptr)(__float128) = __acoshieee128;
int
main ()
{
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
gcc_cv_math_func___acoshieee128=yes
else
gcc_cv_math_func___acoshieee128=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___acoshieee128" >&5
$as_echo "$gcc_cv_math_func___acoshieee128" >&6; }
if test $gcc_cv_math_func___acoshieee128 = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE___ACOSHIEEE128 1
_ACEOF
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __acosieee128" >&5
$as_echo_n "checking for __acosieee128... " >&6; }
if ${gcc_cv_math_func___acosieee128+:} false; then :
$as_echo_n "(cached) " >&6
else
if test x$gcc_no_link = xyes; then
as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
__float128 __acosieee128 (__float128);
__float128 (*ptr)(__float128) = __acosieee128;
int
main ()
{
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
gcc_cv_math_func___acosieee128=yes
else
gcc_cv_math_func___acosieee128=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___acosieee128" >&5
$as_echo "$gcc_cv_math_func___acosieee128" >&6; }
if test $gcc_cv_math_func___acosieee128 = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE___ACOSIEEE128 1
_ACEOF
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __asinhieee128" >&5
$as_echo_n "checking for __asinhieee128... " >&6; }
if ${gcc_cv_math_func___asinhieee128+:} false; then :
$as_echo_n "(cached) " >&6
else
if test x$gcc_no_link = xyes; then
as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
__float128 __asinhieee128 (__float128);
__float128 (*ptr)(__float128) = __asinhieee128;
int
main ()
{
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
gcc_cv_math_func___asinhieee128=yes
else
gcc_cv_math_func___asinhieee128=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___asinhieee128" >&5
$as_echo "$gcc_cv_math_func___asinhieee128" >&6; }
if test $gcc_cv_math_func___asinhieee128 = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE___ASINHIEEE128 1
_ACEOF
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __asinieee128" >&5
$as_echo_n "checking for __asinieee128... " >&6; }
if ${gcc_cv_math_func___asinieee128+:} false; then :
$as_echo_n "(cached) " >&6
else
if test x$gcc_no_link = xyes; then
as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
__float128 __asinieee128 (__float128);
__float128 (*ptr)(__float128) = __asinieee128;
int
main ()
{
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
gcc_cv_math_func___asinieee128=yes
else
gcc_cv_math_func___asinieee128=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___asinieee128" >&5
$as_echo "$gcc_cv_math_func___asinieee128" >&6; }
if test $gcc_cv_math_func___asinieee128 = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE___ASINIEEE128 1
_ACEOF
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __atan2ieee128" >&5
$as_echo_n "checking for __atan2ieee128... " >&6; }
if ${gcc_cv_math_func___atan2ieee128+:} false; then :
$as_echo_n "(cached) " >&6
else
if test x$gcc_no_link = xyes; then
as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
__float128 __atan2ieee128 (__float128);
__float128 (*ptr)(__float128) = __atan2ieee128;
int
main ()
{
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
gcc_cv_math_func___atan2ieee128=yes
else
gcc_cv_math_func___atan2ieee128=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___atan2ieee128" >&5
$as_echo "$gcc_cv_math_func___atan2ieee128" >&6; }
if test $gcc_cv_math_func___atan2ieee128 = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE___ATAN2IEEE128 1
_ACEOF
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __atanhieee128" >&5
$as_echo_n "checking for __atanhieee128... " >&6; }
if ${gcc_cv_math_func___atanhieee128+:} false; then :
$as_echo_n "(cached) " >&6
else
if test x$gcc_no_link = xyes; then
as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
__float128 __atanhieee128 (__float128);
__float128 (*ptr)(__float128) = __atanhieee128;
int
main ()
{
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
gcc_cv_math_func___atanhieee128=yes
else
gcc_cv_math_func___atanhieee128=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___atanhieee128" >&5
$as_echo "$gcc_cv_math_func___atanhieee128" >&6; }
if test $gcc_cv_math_func___atanhieee128 = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE___ATANHIEEE128 1
_ACEOF
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __atanieee128" >&5
$as_echo_n "checking for __atanieee128... " >&6; }
if ${gcc_cv_math_func___atanieee128+:} false; then :
$as_echo_n "(cached) " >&6
else
if test x$gcc_no_link = xyes; then
as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
__float128 __atanieee128 (__float128);
__float128 (*ptr)(__float128) = __atanieee128;
int
main ()
{
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
gcc_cv_math_func___atanieee128=yes
else
gcc_cv_math_func___atanieee128=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___atanieee128" >&5
$as_echo "$gcc_cv_math_func___atanieee128" >&6; }
if test $gcc_cv_math_func___atanieee128 = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE___ATANIEEE128 1
_ACEOF
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __coshieee128" >&5
$as_echo_n "checking for __coshieee128... " >&6; }
if ${gcc_cv_math_func___coshieee128+:} false; then :
$as_echo_n "(cached) " >&6
else
if test x$gcc_no_link = xyes; then
as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
__float128 __coshieee128 (__float128);
__float128 (*ptr)(__float128) = __coshieee128;
int
main ()
{
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
gcc_cv_math_func___coshieee128=yes
else
gcc_cv_math_func___coshieee128=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___coshieee128" >&5
$as_echo "$gcc_cv_math_func___coshieee128" >&6; }
if test $gcc_cv_math_func___coshieee128 = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE___COSHIEEE128 1
_ACEOF
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cosieee128" >&5
$as_echo_n "checking for __cosieee128... " >&6; }
if ${gcc_cv_math_func___cosieee128+:} false; then :
$as_echo_n "(cached) " >&6
else
if test x$gcc_no_link = xyes; then
as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
__float128 __cosieee128 (__float128);
__float128 (*ptr)(__float128) = __cosieee128;
int
main ()
{
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
gcc_cv_math_func___cosieee128=yes
else
gcc_cv_math_func___cosieee128=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___cosieee128" >&5
$as_echo "$gcc_cv_math_func___cosieee128" >&6; }
if test $gcc_cv_math_func___cosieee128 = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE___COSIEEE128 1
_ACEOF
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __erfieee128" >&5
$as_echo_n "checking for __erfieee128... " >&6; }
if ${gcc_cv_math_func___erfieee128+:} false; then :
$as_echo_n "(cached) " >&6
else
if test x$gcc_no_link = xyes; then
as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
__float128 __erfieee128 (__float128);
__float128 (*ptr)(__float128) = __erfieee128;
int
main ()
{
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
gcc_cv_math_func___erfieee128=yes
else
gcc_cv_math_func___erfieee128=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___erfieee128" >&5
$as_echo "$gcc_cv_math_func___erfieee128" >&6; }
if test $gcc_cv_math_func___erfieee128 = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE___ERFIEEE128 1
_ACEOF
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __expieee128" >&5
$as_echo_n "checking for __expieee128... " >&6; }
if ${gcc_cv_math_func___expieee128+:} false; then :
$as_echo_n "(cached) " >&6
else
if test x$gcc_no_link = xyes; then
as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
__float128 __expieee128 (__float128);
__float128 (*ptr)(__float128) = __expieee128;
int
main ()
{
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
gcc_cv_math_func___expieee128=yes
else
gcc_cv_math_func___expieee128=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___expieee128" >&5
$as_echo "$gcc_cv_math_func___expieee128" >&6; }
if test $gcc_cv_math_func___expieee128 = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE___EXPIEEE128 1
_ACEOF
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fabsieee128" >&5
$as_echo_n "checking for __fabsieee128... " >&6; }
if ${gcc_cv_math_func___fabsieee128+:} false; then :
$as_echo_n "(cached) " >&6
else
if test x$gcc_no_link = xyes; then
as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
__float128 __fabsieee128 (__float128);
__float128 (*ptr)(__float128) = __fabsieee128;
int
main ()
{
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
gcc_cv_math_func___fabsieee128=yes
else
gcc_cv_math_func___fabsieee128=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___fabsieee128" >&5
$as_echo "$gcc_cv_math_func___fabsieee128" >&6; }
if test $gcc_cv_math_func___fabsieee128 = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE___FABSIEEE128 1
_ACEOF
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __jnieee128" >&5
$as_echo_n "checking for __jnieee128... " >&6; }
if ${gcc_cv_math_func___jnieee128+:} false; then :
$as_echo_n "(cached) " >&6
else
if test x$gcc_no_link = xyes; then
as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
__float128 __jnieee128 (__float128);
__float128 (*ptr)(__float128) = __jnieee128;
int
main ()
{
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
gcc_cv_math_func___jnieee128=yes
else
gcc_cv_math_func___jnieee128=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___jnieee128" >&5
$as_echo "$gcc_cv_math_func___jnieee128" >&6; }
if test $gcc_cv_math_func___jnieee128 = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE___JNIEEE128 1
_ACEOF
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __log10ieee128" >&5
$as_echo_n "checking for __log10ieee128... " >&6; }
if ${gcc_cv_math_func___log10ieee128+:} false; then :
$as_echo_n "(cached) " >&6
else
if test x$gcc_no_link = xyes; then
as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
__float128 __log10ieee128 (__float128);
__float128 (*ptr)(__float128) = __log10ieee128;
int
main ()
{
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
gcc_cv_math_func___log10ieee128=yes
else
gcc_cv_math_func___log10ieee128=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___log10ieee128" >&5
$as_echo "$gcc_cv_math_func___log10ieee128" >&6; }
if test $gcc_cv_math_func___log10ieee128 = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE___LOG10IEEE128 1
_ACEOF
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __logieee128" >&5
$as_echo_n "checking for __logieee128... " >&6; }
if ${gcc_cv_math_func___logieee128+:} false; then :
$as_echo_n "(cached) " >&6
else
if test x$gcc_no_link = xyes; then
as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
__float128 __logieee128 (__float128);
__float128 (*ptr)(__float128) = __logieee128;
int
main ()
{
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
gcc_cv_math_func___logieee128=yes
else
gcc_cv_math_func___logieee128=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___logieee128" >&5
$as_echo "$gcc_cv_math_func___logieee128" >&6; }
if test $gcc_cv_math_func___logieee128 = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE___LOGIEEE128 1
_ACEOF
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __powieee128" >&5
$as_echo_n "checking for __powieee128... " >&6; }
if ${gcc_cv_math_func___powieee128+:} false; then :
$as_echo_n "(cached) " >&6
else
if test x$gcc_no_link = xyes; then
as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
__float128 __powieee128 (__float128);
__float128 (*ptr)(__float128) = __powieee128;
int
main ()
{
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
gcc_cv_math_func___powieee128=yes
else
gcc_cv_math_func___powieee128=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___powieee128" >&5
$as_echo "$gcc_cv_math_func___powieee128" >&6; }
if test $gcc_cv_math_func___powieee128 = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE___POWIEEE128 1
_ACEOF
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __sinhieee128" >&5
$as_echo_n "checking for __sinhieee128... " >&6; }
if ${gcc_cv_math_func___sinhieee128+:} false; then :
$as_echo_n "(cached) " >&6
else
if test x$gcc_no_link = xyes; then
as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
__float128 __sinhieee128 (__float128);
__float128 (*ptr)(__float128) = __sinhieee128;
int
main ()
{
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
gcc_cv_math_func___sinhieee128=yes
else
gcc_cv_math_func___sinhieee128=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___sinhieee128" >&5
$as_echo "$gcc_cv_math_func___sinhieee128" >&6; }
if test $gcc_cv_math_func___sinhieee128 = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE___SINHIEEE128 1
_ACEOF
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __sinieee128" >&5
$as_echo_n "checking for __sinieee128... " >&6; }
if ${gcc_cv_math_func___sinieee128+:} false; then :
$as_echo_n "(cached) " >&6
else
if test x$gcc_no_link = xyes; then
as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
__float128 __sinieee128 (__float128);
__float128 (*ptr)(__float128) = __sinieee128;
int
main ()
{
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
gcc_cv_math_func___sinieee128=yes
else
gcc_cv_math_func___sinieee128=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___sinieee128" >&5
$as_echo "$gcc_cv_math_func___sinieee128" >&6; }
if test $gcc_cv_math_func___sinieee128 = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE___SINIEEE128 1
_ACEOF
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __sqrtieee128" >&5
$as_echo_n "checking for __sqrtieee128... " >&6; }
if ${gcc_cv_math_func___sqrtieee128+:} false; then :
$as_echo_n "(cached) " >&6
else
if test x$gcc_no_link = xyes; then
as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
__float128 __sqrtieee128 (__float128);
__float128 (*ptr)(__float128) = __sqrtieee128;
int
main ()
{
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
gcc_cv_math_func___sqrtieee128=yes
else
gcc_cv_math_func___sqrtieee128=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___sqrtieee128" >&5
$as_echo "$gcc_cv_math_func___sqrtieee128" >&6; }
if test $gcc_cv_math_func___sqrtieee128 = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE___SQRTIEEE128 1
_ACEOF
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __tanhieee128" >&5
$as_echo_n "checking for __tanhieee128... " >&6; }
if ${gcc_cv_math_func___tanhieee128+:} false; then :
$as_echo_n "(cached) " >&6
else
if test x$gcc_no_link = xyes; then
as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
__float128 __tanhieee128 (__float128);
__float128 (*ptr)(__float128) = __tanhieee128;
int
main ()
{
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
gcc_cv_math_func___tanhieee128=yes
else
gcc_cv_math_func___tanhieee128=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___tanhieee128" >&5
$as_echo "$gcc_cv_math_func___tanhieee128" >&6; }
if test $gcc_cv_math_func___tanhieee128 = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE___TANHIEEE128 1
_ACEOF
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __tanieee128" >&5
$as_echo_n "checking for __tanieee128... " >&6; }
if ${gcc_cv_math_func___tanieee128+:} false; then :
$as_echo_n "(cached) " >&6
else
if test x$gcc_no_link = xyes; then
as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
__float128 __tanieee128 (__float128);
__float128 (*ptr)(__float128) = __tanieee128;
int
main ()
{
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
gcc_cv_math_func___tanieee128=yes
else
gcc_cv_math_func___tanieee128=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___tanieee128" >&5
$as_echo "$gcc_cv_math_func___tanieee128" >&6; }
if test $gcc_cv_math_func___tanieee128 = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE___TANIEEE128 1
_ACEOF
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __ynieee128" >&5
$as_echo_n "checking for __ynieee128... " >&6; }
if ${gcc_cv_math_func___ynieee128+:} false; then :
$as_echo_n "(cached) " >&6
else
if test x$gcc_no_link = xyes; then
as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
__float128 __ynieee128 (__float128);
__float128 (*ptr)(__float128) = __ynieee128;
int
main ()
{
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
gcc_cv_math_func___ynieee128=yes
else
gcc_cv_math_func___ynieee128=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___ynieee128" >&5
$as_echo "$gcc_cv_math_func___ynieee128" >&6; }
if test $gcc_cv_math_func___ynieee128 = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE___YNIEEE128 1
_ACEOF
fi
fi
# On AIX, clog is present in libm as __clog
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __clog in -lm" >&5
$as_echo_n "checking for __clog in -lm... " >&6; }

View file

@ -173,6 +173,7 @@ if test "x$GCC" = "xyes"; then
esac
fi
AM_CONDITIONAL([HAVE_REAL_17], [test "x$have_real_17" != xno])
# Add CET specific flags if CET is enabled
GCC_CET_FLAGS(CET_FLAGS)
AM_FCFLAGS="$AM_FCFLAGS $CET_FLAGS"
@ -543,6 +544,33 @@ GCC_CHECK_MATH_FUNC([catanhf])
GCC_CHECK_MATH_FUNC([catanhl])
GCC_CHECK_MATH_FUNC([catanl])
# For POWER, check the ieee128 math functions
if test "x$have_real_17" = "xyes"; then
LIBGFOR_CHECK_MATH_IEEE128([__acoshieee128])
LIBGFOR_CHECK_MATH_IEEE128([__acosieee128])
LIBGFOR_CHECK_MATH_IEEE128([__asinhieee128])
LIBGFOR_CHECK_MATH_IEEE128([__asinieee128])
LIBGFOR_CHECK_MATH_IEEE128([__atan2ieee128])
LIBGFOR_CHECK_MATH_IEEE128([__atanhieee128])
LIBGFOR_CHECK_MATH_IEEE128([__atanieee128])
LIBGFOR_CHECK_MATH_IEEE128([__coshieee128])
LIBGFOR_CHECK_MATH_IEEE128([__cosieee128])
LIBGFOR_CHECK_MATH_IEEE128([__erfieee128])
LIBGFOR_CHECK_MATH_IEEE128([__expieee128])
LIBGFOR_CHECK_MATH_IEEE128([__fabsieee128])
LIBGFOR_CHECK_MATH_IEEE128([__jnieee128])
LIBGFOR_CHECK_MATH_IEEE128([__log10ieee128])
LIBGFOR_CHECK_MATH_IEEE128([__logieee128])
LIBGFOR_CHECK_MATH_IEEE128([__powieee128])
LIBGFOR_CHECK_MATH_IEEE128([__sinhieee128])
LIBGFOR_CHECK_MATH_IEEE128([__sinieee128])
LIBGFOR_CHECK_MATH_IEEE128([__sqrtieee128])
LIBGFOR_CHECK_MATH_IEEE128([__tanhieee128])
LIBGFOR_CHECK_MATH_IEEE128([__tanieee128])
LIBGFOR_CHECK_MATH_IEEE128([__ynieee128])
fi
# On AIX, clog is present in libm as __clog
AC_CHECK_LIB([m],[__clog],[AC_DEFINE([HAVE_CLOG],[1],[libm includes clog])])