summaryrefslogtreecommitdiffstats
path: root/libgfortran
diff options
context:
space:
mode:
authorThomas Koenig <tkoenig@gcc.gnu.org>2021-12-12 12:59:18 +0100
committerJakub Jelinek <jakub@redhat.com>2022-01-11 23:40:34 +0100
commit6f4977fc8eb1aecf7668cad626ead071fd64ff51 (patch)
treec632c86d2abf173fba62df5487853f41bca504a8 /libgfortran
parentFix pattern substition for _r17 and _c17. (diff)
downloadgcc-6f4977fc8eb1aecf7668cad626ead071fd64ff51.tar.gz
gcc-6f4977fc8eb1aecf7668cad626ead071fd64ff51.tar.bz2
gcc-6f4977fc8eb1aecf7668cad626ead071fd64ff51.tar.xz
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.
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/acinclude.m423
-rw-r--r--libgfortran/config.h.in66
-rwxr-xr-xlibgfortran/configure930
-rw-r--r--libgfortran/configure.ac28
4 files changed, 1047 insertions, 0 deletions
diff --git a/libgfortran/acinclude.m4 b/libgfortran/acinclude.m4
index 5b0c094e716..bf4cc782ec2 100644
--- a/libgfortran/acinclude.m4
+++ b/libgfortran/acinclude.m4
@@ -510,3 +510,26 @@ AC_DEFUN([LIBGFOR_CHECK_AVX128], [
510 [AM_CONDITIONAL([HAVE_AVX128],false)]) 510 [AM_CONDITIONAL([HAVE_AVX128],false)])
511 CFLAGS="$ac_save_CFLAGS" 511 CFLAGS="$ac_save_CFLAGS"
512]) 512])
513
514AC_DEFUN([LIBGFOR_CHECK_MATH_IEEE128],
515[
516 AC_REQUIRE([GCC_CHECK_LIBM])
517 AC_REQUIRE([GCC_CHECK_MATH_HEADERS])
518 AC_CACHE_CHECK([for $1], [gcc_cv_math_func_$1],
519 [AC_LINK_IFELSE([AC_LANG_SOURCE([
520__float128 $1 (__float128);
521__float128 (*ptr)(__float128) = $1;
522
523int
524main ()
525{
526 return 0;
527}
528])],
529[gcc_cv_math_func_$1=yes],
530[gcc_cv_math_func_$1=no])])
531 if test $gcc_cv_math_func_$1 = yes; then
532 AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_$1),[1],
533 [Define to 1 if you have the `$1' function.])
534 fi
535])
diff --git a/libgfortran/config.h.in b/libgfortran/config.h.in
index 2d58188e50c..02dcf49c49a 100644
--- a/libgfortran/config.h.in
+++ b/libgfortran/config.h.in
@@ -888,9 +888,75 @@
888/* Define to 1 if you have the `ynl' function. */ 888/* Define to 1 if you have the `ynl' function. */
889#undef HAVE_YNL 889#undef HAVE_YNL
890 890
891/* Define to 1 if you have the `__acoshieee128' function. */
892#undef HAVE___ACOSHIEEE128
893
894/* Define to 1 if you have the `__acosieee128' function. */
895#undef HAVE___ACOSIEEE128
896
897/* Define to 1 if you have the `__asinhieee128' function. */
898#undef HAVE___ASINHIEEE128
899
900/* Define to 1 if you have the `__asinieee128' function. */
901#undef HAVE___ASINIEEE128
902
903/* Define to 1 if you have the `__atan2ieee128' function. */
904#undef HAVE___ATAN2IEEE128
905
906/* Define to 1 if you have the `__atanhieee128' function. */
907#undef HAVE___ATANHIEEE128
908
909/* Define to 1 if you have the `__atanieee128' function. */
910#undef HAVE___ATANIEEE128
911
912/* Define to 1 if you have the `__coshieee128' function. */
913#undef HAVE___COSHIEEE128
914
915/* Define to 1 if you have the `__cosieee128' function. */
916#undef HAVE___COSIEEE128
917
918/* Define to 1 if you have the `__erfieee128' function. */
919#undef HAVE___ERFIEEE128
920
921/* Define to 1 if you have the `__expieee128' function. */
922#undef HAVE___EXPIEEE128
923
924/* Define to 1 if you have the `__fabsieee128' function. */
925#undef HAVE___FABSIEEE128
926
927/* Define to 1 if you have the `__jnieee128' function. */
928#undef HAVE___JNIEEE128
929
930/* Define to 1 if you have the `__log10ieee128' function. */
931#undef HAVE___LOG10IEEE128
932
933/* Define to 1 if you have the `__logieee128' function. */
934#undef HAVE___LOGIEEE128
935
936/* Define to 1 if you have the `__powieee128' function. */
937#undef HAVE___POWIEEE128
938
891/* Define to 1 if you have the `__secure_getenv' function. */ 939/* Define to 1 if you have the `__secure_getenv' function. */
892#undef HAVE___SECURE_GETENV 940#undef HAVE___SECURE_GETENV
893 941
942/* Define to 1 if you have the `__sinhieee128' function. */
943#undef HAVE___SINHIEEE128
944
945/* Define to 1 if you have the `__sinieee128' function. */
946#undef HAVE___SINIEEE128
947
948/* Define to 1 if you have the `__sqrtieee128' function. */
949#undef HAVE___SQRTIEEE128
950
951/* Define to 1 if you have the `__tanhieee128' function. */
952#undef HAVE___TANHIEEE128
953
954/* Define to 1 if you have the `__tanieee128' function. */
955#undef HAVE___TANIEEE128
956
957/* Define to 1 if you have the `__ynieee128' function. */
958#undef HAVE___YNIEEE128
959
894/* Define to the sub-directory in which libtool stores uninstalled libraries. 960/* Define to the sub-directory in which libtool stores uninstalled libraries.
895 */ 961 */
896#undef LT_OBJDIR 962#undef LT_OBJDIR
diff --git a/libgfortran/configure b/libgfortran/configure
index cc32e06b483..5331285e8eb 100755
--- a/libgfortran/configure
+++ b/libgfortran/configure
@@ -6032,6 +6032,7 @@ else
6032 HAVE_REAL_17_FALSE= 6032 HAVE_REAL_17_FALSE=
6033fi 6033fi
6034 6034
6035
6035# Add CET specific flags if CET is enabled 6036# Add CET specific flags if CET is enabled
6036 # Check whether --enable-cet was given. 6037 # Check whether --enable-cet was given.
6037if test "${enable_cet+set}" = set; then : 6038if test "${enable_cet+set}" = set; then :
@@ -25833,6 +25834,935 @@ _ACEOF
25833 fi 25834 fi
25834 25835
25835 25836
25837# For POWER, check the ieee128 math functions
25838
25839if test "x$have_real_17" = "xyes"; then
25840
25841
25842
25843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __acoshieee128" >&5
25844$as_echo_n "checking for __acoshieee128... " >&6; }
25845if ${gcc_cv_math_func___acoshieee128+:} false; then :
25846 $as_echo_n "(cached) " >&6
25847else
25848 if test x$gcc_no_link = xyes; then
25849 as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
25850fi
25851cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25852/* end confdefs.h. */
25853
25854__float128 __acoshieee128 (__float128);
25855__float128 (*ptr)(__float128) = __acoshieee128;
25856
25857int
25858main ()
25859{
25860 return 0;
25861}
25862
25863_ACEOF
25864if ac_fn_c_try_link "$LINENO"; then :
25865 gcc_cv_math_func___acoshieee128=yes
25866else
25867 gcc_cv_math_func___acoshieee128=no
25868fi
25869rm -f core conftest.err conftest.$ac_objext \
25870 conftest$ac_exeext conftest.$ac_ext
25871fi
25872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___acoshieee128" >&5
25873$as_echo "$gcc_cv_math_func___acoshieee128" >&6; }
25874 if test $gcc_cv_math_func___acoshieee128 = yes; then
25875
25876cat >>confdefs.h <<_ACEOF
25877#define HAVE___ACOSHIEEE128 1
25878_ACEOF
25879
25880 fi
25881
25882
25883
25884
25885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __acosieee128" >&5
25886$as_echo_n "checking for __acosieee128... " >&6; }
25887if ${gcc_cv_math_func___acosieee128+:} false; then :
25888 $as_echo_n "(cached) " >&6
25889else
25890 if test x$gcc_no_link = xyes; then
25891 as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
25892fi
25893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25894/* end confdefs.h. */
25895
25896__float128 __acosieee128 (__float128);
25897__float128 (*ptr)(__float128) = __acosieee128;
25898
25899int
25900main ()
25901{
25902 return 0;
25903}
25904
25905_ACEOF
25906if ac_fn_c_try_link "$LINENO"; then :
25907 gcc_cv_math_func___acosieee128=yes
25908else
25909 gcc_cv_math_func___acosieee128=no
25910fi
25911rm -f core conftest.err conftest.$ac_objext \
25912 conftest$ac_exeext conftest.$ac_ext
25913fi
25914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___acosieee128" >&5
25915$as_echo "$gcc_cv_math_func___acosieee128" >&6; }
25916 if test $gcc_cv_math_func___acosieee128 = yes; then
25917
25918cat >>confdefs.h <<_ACEOF
25919#define HAVE___ACOSIEEE128 1
25920_ACEOF
25921
25922 fi
25923
25924
25925
25926
25927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __asinhieee128" >&5
25928$as_echo_n "checking for __asinhieee128... " >&6; }
25929if ${gcc_cv_math_func___asinhieee128+:} false; then :
25930 $as_echo_n "(cached) " >&6
25931else
25932 if test x$gcc_no_link = xyes; then
25933 as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
25934fi
25935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25936/* end confdefs.h. */
25937
25938__float128 __asinhieee128 (__float128);
25939__float128 (*ptr)(__float128) = __asinhieee128;
25940
25941int
25942main ()
25943{
25944 return 0;
25945}
25946
25947_ACEOF
25948if ac_fn_c_try_link "$LINENO"; then :
25949 gcc_cv_math_func___asinhieee128=yes
25950else
25951 gcc_cv_math_func___asinhieee128=no
25952fi
25953rm -f core conftest.err conftest.$ac_objext \
25954 conftest$ac_exeext conftest.$ac_ext
25955fi
25956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___asinhieee128" >&5
25957$as_echo "$gcc_cv_math_func___asinhieee128" >&6; }
25958 if test $gcc_cv_math_func___asinhieee128 = yes; then
25959
25960cat >>confdefs.h <<_ACEOF
25961#define HAVE___ASINHIEEE128 1
25962_ACEOF
25963
25964 fi
25965
25966
25967
25968
25969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __asinieee128" >&5
25970$as_echo_n "checking for __asinieee128... " >&6; }
25971if ${gcc_cv_math_func___asinieee128+:} false; then :
25972 $as_echo_n "(cached) " >&6
25973else
25974 if test x$gcc_no_link = xyes; then
25975 as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
25976fi
25977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25978/* end confdefs.h. */
25979
25980__float128 __asinieee128 (__float128);
25981__float128 (*ptr)(__float128) = __asinieee128;
25982
25983int
25984main ()
25985{
25986 return 0;
25987}
25988
25989_ACEOF
25990if ac_fn_c_try_link "$LINENO"; then :
25991 gcc_cv_math_func___asinieee128=yes
25992else
25993 gcc_cv_math_func___asinieee128=no
25994fi
25995rm -f core conftest.err conftest.$ac_objext \
25996 conftest$ac_exeext conftest.$ac_ext
25997fi
25998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___asinieee128" >&5
25999$as_echo "$gcc_cv_math_func___asinieee128" >&6; }
26000 if test $gcc_cv_math_func___asinieee128 = yes; then
26001
26002cat >>confdefs.h <<_ACEOF
26003#define HAVE___ASINIEEE128 1
26004_ACEOF
26005
26006 fi
26007
26008
26009
26010
26011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __atan2ieee128" >&5
26012$as_echo_n "checking for __atan2ieee128... " >&6; }
26013if ${gcc_cv_math_func___atan2ieee128+:} false; then :
26014 $as_echo_n "(cached) " >&6
26015else
26016 if test x$gcc_no_link = xyes; then
26017 as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
26018fi
26019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26020/* end confdefs.h. */
26021
26022__float128 __atan2ieee128 (__float128);
26023__float128 (*ptr)(__float128) = __atan2ieee128;
26024
26025int
26026main ()
26027{
26028 return 0;
26029}
26030
26031_ACEOF
26032if ac_fn_c_try_link "$LINENO"; then :
26033 gcc_cv_math_func___atan2ieee128=yes
26034else
26035 gcc_cv_math_func___atan2ieee128=no
26036fi
26037rm -f core conftest.err conftest.$ac_objext \
26038 conftest$ac_exeext conftest.$ac_ext
26039fi
26040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___atan2ieee128" >&5
26041$as_echo "$gcc_cv_math_func___atan2ieee128" >&6; }
26042 if test $gcc_cv_math_func___atan2ieee128 = yes; then
26043
26044cat >>confdefs.h <<_ACEOF
26045#define HAVE___ATAN2IEEE128 1
26046_ACEOF
26047
26048 fi
26049
26050
26051
26052
26053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __atanhieee128" >&5
26054$as_echo_n "checking for __atanhieee128... " >&6; }
26055if ${gcc_cv_math_func___atanhieee128+:} false; then :
26056 $as_echo_n "(cached) " >&6
26057else
26058 if test x$gcc_no_link = xyes; then
26059 as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
26060fi
26061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26062/* end confdefs.h. */
26063
26064__float128 __atanhieee128 (__float128);
26065__float128 (*ptr)(__float128) = __atanhieee128;
26066
26067int
26068main ()
26069{
26070 return 0;
26071}
26072
26073_ACEOF
26074if ac_fn_c_try_link "$LINENO"; then :
26075 gcc_cv_math_func___atanhieee128=yes
26076else
26077 gcc_cv_math_func___atanhieee128=no
26078fi
26079rm -f core conftest.err conftest.$ac_objext \
26080 conftest$ac_exeext conftest.$ac_ext
26081fi
26082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___atanhieee128" >&5
26083$as_echo "$gcc_cv_math_func___atanhieee128" >&6; }
26084 if test $gcc_cv_math_func___atanhieee128 = yes; then
26085
26086cat >>confdefs.h <<_ACEOF
26087#define HAVE___ATANHIEEE128 1
26088_ACEOF
26089
26090 fi
26091
26092
26093
26094
26095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __atanieee128" >&5
26096$as_echo_n "checking for __atanieee128... " >&6; }
26097if ${gcc_cv_math_func___atanieee128+:} false; then :
26098 $as_echo_n "(cached) " >&6
26099else
26100 if test x$gcc_no_link = xyes; then
26101 as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
26102fi
26103cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26104/* end confdefs.h. */
26105
26106__float128 __atanieee128 (__float128);
26107__float128 (*ptr)(__float128) = __atanieee128;
26108
26109int
26110main ()
26111{
26112 return 0;
26113}
26114
26115_ACEOF
26116if ac_fn_c_try_link "$LINENO"; then :
26117 gcc_cv_math_func___atanieee128=yes
26118else
26119 gcc_cv_math_func___atanieee128=no
26120fi
26121rm -f core conftest.err conftest.$ac_objext \
26122 conftest$ac_exeext conftest.$ac_ext
26123fi
26124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___atanieee128" >&5
26125$as_echo "$gcc_cv_math_func___atanieee128" >&6; }
26126 if test $gcc_cv_math_func___atanieee128 = yes; then
26127
26128cat >>confdefs.h <<_ACEOF
26129#define HAVE___ATANIEEE128 1
26130_ACEOF
26131
26132 fi
26133
26134
26135
26136
26137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __coshieee128" >&5
26138$as_echo_n "checking for __coshieee128... " >&6; }
26139if ${gcc_cv_math_func___coshieee128+:} false; then :
26140 $as_echo_n "(cached) " >&6
26141else
26142 if test x$gcc_no_link = xyes; then
26143 as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
26144fi
26145cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26146/* end confdefs.h. */
26147
26148__float128 __coshieee128 (__float128);
26149__float128 (*ptr)(__float128) = __coshieee128;
26150
26151int
26152main ()
26153{
26154 return 0;
26155}
26156
26157_ACEOF
26158if ac_fn_c_try_link "$LINENO"; then :
26159 gcc_cv_math_func___coshieee128=yes
26160else
26161 gcc_cv_math_func___coshieee128=no
26162fi
26163rm -f core conftest.err conftest.$ac_objext \
26164 conftest$ac_exeext conftest.$ac_ext
26165fi
26166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___coshieee128" >&5
26167$as_echo "$gcc_cv_math_func___coshieee128" >&6; }
26168 if test $gcc_cv_math_func___coshieee128 = yes; then
26169
26170cat >>confdefs.h <<_ACEOF
26171#define HAVE___COSHIEEE128 1
26172_ACEOF
26173
26174 fi
26175
26176
26177
26178
26179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __cosieee128" >&5
26180$as_echo_n "checking for __cosieee128... " >&6; }
26181if ${gcc_cv_math_func___cosieee128+:} false; then :
26182 $as_echo_n "(cached) " >&6
26183else
26184 if test x$gcc_no_link = xyes; then
26185 as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
26186fi
26187cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26188/* end confdefs.h. */
26189
26190__float128 __cosieee128 (__float128);
26191__float128 (*ptr)(__float128) = __cosieee128;
26192
26193int
26194main ()
26195{
26196 return 0;
26197}
26198
26199_ACEOF
26200if ac_fn_c_try_link "$LINENO"; then :
26201 gcc_cv_math_func___cosieee128=yes
26202else
26203 gcc_cv_math_func___cosieee128=no
26204fi
26205rm -f core conftest.err conftest.$ac_objext \
26206 conftest$ac_exeext conftest.$ac_ext
26207fi
26208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___cosieee128" >&5
26209$as_echo "$gcc_cv_math_func___cosieee128" >&6; }
26210 if test $gcc_cv_math_func___cosieee128 = yes; then
26211
26212cat >>confdefs.h <<_ACEOF
26213#define HAVE___COSIEEE128 1
26214_ACEOF
26215
26216 fi
26217
26218
26219
26220
26221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __erfieee128" >&5
26222$as_echo_n "checking for __erfieee128... " >&6; }
26223if ${gcc_cv_math_func___erfieee128+:} false; then :
26224 $as_echo_n "(cached) " >&6
26225else
26226 if test x$gcc_no_link = xyes; then
26227 as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
26228fi
26229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26230/* end confdefs.h. */
26231
26232__float128 __erfieee128 (__float128);
26233__float128 (*ptr)(__float128) = __erfieee128;
26234
26235int
26236main ()
26237{
26238 return 0;
26239}
26240
26241_ACEOF
26242if ac_fn_c_try_link "$LINENO"; then :
26243 gcc_cv_math_func___erfieee128=yes
26244else
26245 gcc_cv_math_func___erfieee128=no
26246fi
26247rm -f core conftest.err conftest.$ac_objext \
26248 conftest$ac_exeext conftest.$ac_ext
26249fi
26250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___erfieee128" >&5
26251$as_echo "$gcc_cv_math_func___erfieee128" >&6; }
26252 if test $gcc_cv_math_func___erfieee128 = yes; then
26253
26254cat >>confdefs.h <<_ACEOF
26255#define HAVE___ERFIEEE128 1
26256_ACEOF
26257
26258 fi
26259
26260
26261
26262
26263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __expieee128" >&5
26264$as_echo_n "checking for __expieee128... " >&6; }
26265if ${gcc_cv_math_func___expieee128+:} false; then :
26266 $as_echo_n "(cached) " >&6
26267else
26268 if test x$gcc_no_link = xyes; then
26269 as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
26270fi
26271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26272/* end confdefs.h. */
26273
26274__float128 __expieee128 (__float128);
26275__float128 (*ptr)(__float128) = __expieee128;
26276
26277int
26278main ()
26279{
26280 return 0;
26281}
26282
26283_ACEOF
26284if ac_fn_c_try_link "$LINENO"; then :
26285 gcc_cv_math_func___expieee128=yes
26286else
26287 gcc_cv_math_func___expieee128=no
26288fi
26289rm -f core conftest.err conftest.$ac_objext \
26290 conftest$ac_exeext conftest.$ac_ext
26291fi
26292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___expieee128" >&5
26293$as_echo "$gcc_cv_math_func___expieee128" >&6; }
26294 if test $gcc_cv_math_func___expieee128 = yes; then
26295
26296cat >>confdefs.h <<_ACEOF
26297#define HAVE___EXPIEEE128 1
26298_ACEOF
26299
26300 fi
26301
26302
26303
26304
26305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fabsieee128" >&5
26306$as_echo_n "checking for __fabsieee128... " >&6; }
26307if ${gcc_cv_math_func___fabsieee128+:} false; then :
26308 $as_echo_n "(cached) " >&6
26309else
26310 if test x$gcc_no_link = xyes; then
26311 as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
26312fi
26313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26314/* end confdefs.h. */
26315
26316__float128 __fabsieee128 (__float128);
26317__float128 (*ptr)(__float128) = __fabsieee128;
26318
26319int
26320main ()
26321{
26322 return 0;
26323}
26324
26325_ACEOF
26326if ac_fn_c_try_link "$LINENO"; then :
26327 gcc_cv_math_func___fabsieee128=yes
26328else
26329 gcc_cv_math_func___fabsieee128=no
26330fi
26331rm -f core conftest.err conftest.$ac_objext \
26332 conftest$ac_exeext conftest.$ac_ext
26333fi
26334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___fabsieee128" >&5
26335$as_echo "$gcc_cv_math_func___fabsieee128" >&6; }
26336 if test $gcc_cv_math_func___fabsieee128 = yes; then
26337
26338cat >>confdefs.h <<_ACEOF
26339#define HAVE___FABSIEEE128 1
26340_ACEOF
26341
26342 fi
26343
26344
26345
26346
26347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __jnieee128" >&5
26348$as_echo_n "checking for __jnieee128... " >&6; }
26349if ${gcc_cv_math_func___jnieee128+:} false; then :
26350 $as_echo_n "(cached) " >&6
26351else
26352 if test x$gcc_no_link = xyes; then
26353 as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
26354fi
26355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26356/* end confdefs.h. */
26357
26358__float128 __jnieee128 (__float128);
26359__float128 (*ptr)(__float128) = __jnieee128;
26360
26361int
26362main ()
26363{
26364 return 0;
26365}
26366
26367_ACEOF
26368if ac_fn_c_try_link "$LINENO"; then :
26369 gcc_cv_math_func___jnieee128=yes
26370else
26371 gcc_cv_math_func___jnieee128=no
26372fi
26373rm -f core conftest.err conftest.$ac_objext \
26374 conftest$ac_exeext conftest.$ac_ext
26375fi
26376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___jnieee128" >&5
26377$as_echo "$gcc_cv_math_func___jnieee128" >&6; }
26378 if test $gcc_cv_math_func___jnieee128 = yes; then
26379
26380cat >>confdefs.h <<_ACEOF
26381#define HAVE___JNIEEE128 1
26382_ACEOF
26383
26384 fi
26385
26386
26387
26388
26389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __log10ieee128" >&5
26390$as_echo_n "checking for __log10ieee128... " >&6; }
26391if ${gcc_cv_math_func___log10ieee128+:} false; then :
26392 $as_echo_n "(cached) " >&6
26393else
26394 if test x$gcc_no_link = xyes; then
26395 as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
26396fi
26397cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26398/* end confdefs.h. */
26399
26400__float128 __log10ieee128 (__float128);
26401__float128 (*ptr)(__float128) = __log10ieee128;
26402
26403int
26404main ()
26405{
26406 return 0;
26407}
26408
26409_ACEOF
26410if ac_fn_c_try_link "$LINENO"; then :
26411 gcc_cv_math_func___log10ieee128=yes
26412else
26413 gcc_cv_math_func___log10ieee128=no
26414fi
26415rm -f core conftest.err conftest.$ac_objext \
26416 conftest$ac_exeext conftest.$ac_ext
26417fi
26418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___log10ieee128" >&5
26419$as_echo "$gcc_cv_math_func___log10ieee128" >&6; }
26420 if test $gcc_cv_math_func___log10ieee128 = yes; then
26421
26422cat >>confdefs.h <<_ACEOF
26423#define HAVE___LOG10IEEE128 1
26424_ACEOF
26425
26426 fi
26427
26428
26429
26430
26431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __logieee128" >&5
26432$as_echo_n "checking for __logieee128... " >&6; }
26433if ${gcc_cv_math_func___logieee128+:} false; then :
26434 $as_echo_n "(cached) " >&6
26435else
26436 if test x$gcc_no_link = xyes; then
26437 as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
26438fi
26439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26440/* end confdefs.h. */
26441
26442__float128 __logieee128 (__float128);
26443__float128 (*ptr)(__float128) = __logieee128;
26444
26445int
26446main ()
26447{
26448 return 0;
26449}
26450
26451_ACEOF
26452if ac_fn_c_try_link "$LINENO"; then :
26453 gcc_cv_math_func___logieee128=yes
26454else
26455 gcc_cv_math_func___logieee128=no
26456fi
26457rm -f core conftest.err conftest.$ac_objext \
26458 conftest$ac_exeext conftest.$ac_ext
26459fi
26460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___logieee128" >&5
26461$as_echo "$gcc_cv_math_func___logieee128" >&6; }
26462 if test $gcc_cv_math_func___logieee128 = yes; then
26463
26464cat >>confdefs.h <<_ACEOF
26465#define HAVE___LOGIEEE128 1
26466_ACEOF
26467
26468 fi
26469
26470
26471
26472
26473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __powieee128" >&5
26474$as_echo_n "checking for __powieee128... " >&6; }
26475if ${gcc_cv_math_func___powieee128+:} false; then :
26476 $as_echo_n "(cached) " >&6
26477else
26478 if test x$gcc_no_link = xyes; then
26479 as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
26480fi
26481cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26482/* end confdefs.h. */
26483
26484__float128 __powieee128 (__float128);
26485__float128 (*ptr)(__float128) = __powieee128;
26486
26487int
26488main ()
26489{
26490 return 0;
26491}
26492
26493_ACEOF
26494if ac_fn_c_try_link "$LINENO"; then :
26495 gcc_cv_math_func___powieee128=yes
26496else
26497 gcc_cv_math_func___powieee128=no
26498fi
26499rm -f core conftest.err conftest.$ac_objext \
26500 conftest$ac_exeext conftest.$ac_ext
26501fi
26502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___powieee128" >&5
26503$as_echo "$gcc_cv_math_func___powieee128" >&6; }
26504 if test $gcc_cv_math_func___powieee128 = yes; then
26505
26506cat >>confdefs.h <<_ACEOF
26507#define HAVE___POWIEEE128 1
26508_ACEOF
26509
26510 fi
26511
26512
26513
26514
26515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __sinhieee128" >&5
26516$as_echo_n "checking for __sinhieee128... " >&6; }
26517if ${gcc_cv_math_func___sinhieee128+:} false; then :
26518 $as_echo_n "(cached) " >&6
26519else
26520 if test x$gcc_no_link = xyes; then
26521 as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
26522fi
26523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26524/* end confdefs.h. */
26525
26526__float128 __sinhieee128 (__float128);
26527__float128 (*ptr)(__float128) = __sinhieee128;
26528
26529int
26530main ()
26531{
26532 return 0;
26533}
26534
26535_ACEOF
26536if ac_fn_c_try_link "$LINENO"; then :
26537 gcc_cv_math_func___sinhieee128=yes
26538else
26539 gcc_cv_math_func___sinhieee128=no
26540fi
26541rm -f core conftest.err conftest.$ac_objext \
26542 conftest$ac_exeext conftest.$ac_ext
26543fi
26544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___sinhieee128" >&5
26545$as_echo "$gcc_cv_math_func___sinhieee128" >&6; }
26546 if test $gcc_cv_math_func___sinhieee128 = yes; then
26547
26548cat >>confdefs.h <<_ACEOF
26549#define HAVE___SINHIEEE128 1
26550_ACEOF
26551
26552 fi
26553
26554
26555
26556
26557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __sinieee128" >&5
26558$as_echo_n "checking for __sinieee128... " >&6; }
26559if ${gcc_cv_math_func___sinieee128+:} false; then :
26560 $as_echo_n "(cached) " >&6
26561else
26562 if test x$gcc_no_link = xyes; then
26563 as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
26564fi
26565cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26566/* end confdefs.h. */
26567
26568__float128 __sinieee128 (__float128);
26569__float128 (*ptr)(__float128) = __sinieee128;
26570
26571int
26572main ()
26573{
26574 return 0;
26575}
26576
26577_ACEOF
26578if ac_fn_c_try_link "$LINENO"; then :
26579 gcc_cv_math_func___sinieee128=yes
26580else
26581 gcc_cv_math_func___sinieee128=no
26582fi
26583rm -f core conftest.err conftest.$ac_objext \
26584 conftest$ac_exeext conftest.$ac_ext
26585fi
26586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___sinieee128" >&5
26587$as_echo "$gcc_cv_math_func___sinieee128" >&6; }
26588 if test $gcc_cv_math_func___sinieee128 = yes; then
26589
26590cat >>confdefs.h <<_ACEOF
26591#define HAVE___SINIEEE128 1
26592_ACEOF
26593
26594 fi
26595
26596
26597
26598
26599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __sqrtieee128" >&5
26600$as_echo_n "checking for __sqrtieee128... " >&6; }
26601if ${gcc_cv_math_func___sqrtieee128+:} false; then :
26602 $as_echo_n "(cached) " >&6
26603else
26604 if test x$gcc_no_link = xyes; then
26605 as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
26606fi
26607cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26608/* end confdefs.h. */
26609
26610__float128 __sqrtieee128 (__float128);
26611__float128 (*ptr)(__float128) = __sqrtieee128;
26612
26613int
26614main ()
26615{
26616 return 0;
26617}
26618
26619_ACEOF
26620if ac_fn_c_try_link "$LINENO"; then :
26621 gcc_cv_math_func___sqrtieee128=yes
26622else
26623 gcc_cv_math_func___sqrtieee128=no
26624fi
26625rm -f core conftest.err conftest.$ac_objext \
26626 conftest$ac_exeext conftest.$ac_ext
26627fi
26628{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___sqrtieee128" >&5
26629$as_echo "$gcc_cv_math_func___sqrtieee128" >&6; }
26630 if test $gcc_cv_math_func___sqrtieee128 = yes; then
26631
26632cat >>confdefs.h <<_ACEOF
26633#define HAVE___SQRTIEEE128 1
26634_ACEOF
26635
26636 fi
26637
26638
26639
26640
26641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __tanhieee128" >&5
26642$as_echo_n "checking for __tanhieee128... " >&6; }
26643if ${gcc_cv_math_func___tanhieee128+:} false; then :
26644 $as_echo_n "(cached) " >&6
26645else
26646 if test x$gcc_no_link = xyes; then
26647 as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
26648fi
26649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26650/* end confdefs.h. */
26651
26652__float128 __tanhieee128 (__float128);
26653__float128 (*ptr)(__float128) = __tanhieee128;
26654
26655int
26656main ()
26657{
26658 return 0;
26659}
26660
26661_ACEOF
26662if ac_fn_c_try_link "$LINENO"; then :
26663 gcc_cv_math_func___tanhieee128=yes
26664else
26665 gcc_cv_math_func___tanhieee128=no
26666fi
26667rm -f core conftest.err conftest.$ac_objext \
26668 conftest$ac_exeext conftest.$ac_ext
26669fi
26670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___tanhieee128" >&5
26671$as_echo "$gcc_cv_math_func___tanhieee128" >&6; }
26672 if test $gcc_cv_math_func___tanhieee128 = yes; then
26673
26674cat >>confdefs.h <<_ACEOF
26675#define HAVE___TANHIEEE128 1
26676_ACEOF
26677
26678 fi
26679
26680
26681
26682
26683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __tanieee128" >&5
26684$as_echo_n "checking for __tanieee128... " >&6; }
26685if ${gcc_cv_math_func___tanieee128+:} false; then :
26686 $as_echo_n "(cached) " >&6
26687else
26688 if test x$gcc_no_link = xyes; then
26689 as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
26690fi
26691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26692/* end confdefs.h. */
26693
26694__float128 __tanieee128 (__float128);
26695__float128 (*ptr)(__float128) = __tanieee128;
26696
26697int
26698main ()
26699{
26700 return 0;
26701}
26702
26703_ACEOF
26704if ac_fn_c_try_link "$LINENO"; then :
26705 gcc_cv_math_func___tanieee128=yes
26706else
26707 gcc_cv_math_func___tanieee128=no
26708fi
26709rm -f core conftest.err conftest.$ac_objext \
26710 conftest$ac_exeext conftest.$ac_ext
26711fi
26712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___tanieee128" >&5
26713$as_echo "$gcc_cv_math_func___tanieee128" >&6; }
26714 if test $gcc_cv_math_func___tanieee128 = yes; then
26715
26716cat >>confdefs.h <<_ACEOF
26717#define HAVE___TANIEEE128 1
26718_ACEOF
26719
26720 fi
26721
26722
26723
26724
26725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __ynieee128" >&5
26726$as_echo_n "checking for __ynieee128... " >&6; }
26727if ${gcc_cv_math_func___ynieee128+:} false; then :
26728 $as_echo_n "(cached) " >&6
26729else
26730 if test x$gcc_no_link = xyes; then
26731 as_fn_error $? "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5
26732fi
26733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26734/* end confdefs.h. */
26735
26736__float128 __ynieee128 (__float128);
26737__float128 (*ptr)(__float128) = __ynieee128;
26738
26739int
26740main ()
26741{
26742 return 0;
26743}
26744
26745_ACEOF
26746if ac_fn_c_try_link "$LINENO"; then :
26747 gcc_cv_math_func___ynieee128=yes
26748else
26749 gcc_cv_math_func___ynieee128=no
26750fi
26751rm -f core conftest.err conftest.$ac_objext \
26752 conftest$ac_exeext conftest.$ac_ext
26753fi
26754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_math_func___ynieee128" >&5
26755$as_echo "$gcc_cv_math_func___ynieee128" >&6; }
26756 if test $gcc_cv_math_func___ynieee128 = yes; then
26757
26758cat >>confdefs.h <<_ACEOF
26759#define HAVE___YNIEEE128 1
26760_ACEOF
26761
26762 fi
26763
26764fi
26765
25836# On AIX, clog is present in libm as __clog 26766# On AIX, clog is present in libm as __clog
25837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __clog in -lm" >&5 26767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __clog in -lm" >&5
25838$as_echo_n "checking for __clog in -lm... " >&6; } 26768$as_echo_n "checking for __clog in -lm... " >&6; }
diff --git a/libgfortran/configure.ac b/libgfortran/configure.ac
index 97439a805d5..39f38bac4ba 100644
--- a/libgfortran/configure.ac
+++ b/libgfortran/configure.ac
@@ -173,6 +173,7 @@ if test "x$GCC" = "xyes"; then
173 esac 173 esac
174fi 174fi
175AM_CONDITIONAL([HAVE_REAL_17], [test "x$have_real_17" != xno]) 175AM_CONDITIONAL([HAVE_REAL_17], [test "x$have_real_17" != xno])
176
176# Add CET specific flags if CET is enabled 177# Add CET specific flags if CET is enabled
177GCC_CET_FLAGS(CET_FLAGS) 178GCC_CET_FLAGS(CET_FLAGS)
178AM_FCFLAGS="$AM_FCFLAGS $CET_FLAGS" 179AM_FCFLAGS="$AM_FCFLAGS $CET_FLAGS"
@@ -543,6 +544,33 @@ GCC_CHECK_MATH_FUNC([catanhf])
543GCC_CHECK_MATH_FUNC([catanhl]) 544GCC_CHECK_MATH_FUNC([catanhl])
544GCC_CHECK_MATH_FUNC([catanl]) 545GCC_CHECK_MATH_FUNC([catanl])
545 546
547# For POWER, check the ieee128 math functions
548
549if test "x$have_real_17" = "xyes"; then
550LIBGFOR_CHECK_MATH_IEEE128([__acoshieee128])
551LIBGFOR_CHECK_MATH_IEEE128([__acosieee128])
552LIBGFOR_CHECK_MATH_IEEE128([__asinhieee128])
553LIBGFOR_CHECK_MATH_IEEE128([__asinieee128])
554LIBGFOR_CHECK_MATH_IEEE128([__atan2ieee128])
555LIBGFOR_CHECK_MATH_IEEE128([__atanhieee128])
556LIBGFOR_CHECK_MATH_IEEE128([__atanieee128])
557LIBGFOR_CHECK_MATH_IEEE128([__coshieee128])
558LIBGFOR_CHECK_MATH_IEEE128([__cosieee128])
559LIBGFOR_CHECK_MATH_IEEE128([__erfieee128])
560LIBGFOR_CHECK_MATH_IEEE128([__expieee128])
561LIBGFOR_CHECK_MATH_IEEE128([__fabsieee128])
562LIBGFOR_CHECK_MATH_IEEE128([__jnieee128])
563LIBGFOR_CHECK_MATH_IEEE128([__log10ieee128])
564LIBGFOR_CHECK_MATH_IEEE128([__logieee128])
565LIBGFOR_CHECK_MATH_IEEE128([__powieee128])
566LIBGFOR_CHECK_MATH_IEEE128([__sinhieee128])
567LIBGFOR_CHECK_MATH_IEEE128([__sinieee128])
568LIBGFOR_CHECK_MATH_IEEE128([__sqrtieee128])
569LIBGFOR_CHECK_MATH_IEEE128([__tanhieee128])
570LIBGFOR_CHECK_MATH_IEEE128([__tanieee128])
571LIBGFOR_CHECK_MATH_IEEE128([__ynieee128])
572fi
573
546# On AIX, clog is present in libm as __clog 574# On AIX, clog is present in libm as __clog
547AC_CHECK_LIB([m],[__clog],[AC_DEFINE([HAVE_CLOG],[1],[libm includes clog])]) 575AC_CHECK_LIB([m],[__clog],[AC_DEFINE([HAVE_CLOG],[1],[libm includes clog])])
548 576