diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2024-02-21 10:44:47 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2024-04-17 16:13:57 -0300 |
commit | 534b6296b804d14fe1a5efbdb2de5c009391d837 (patch) | |
tree | ca31328346475fdd7da1a89e778f500ea9a53495 /sysdeps/x86_64/configure | |
parent | 8565bb7763e71465b2f6dceb2319a785cf9092c0 (diff) | |
download | glibc-534b6296b804d14fe1a5efbdb2de5c009391d837.tar.gz glibc-534b6296b804d14fe1a5efbdb2de5c009391d837.tar.xz glibc-534b6296b804d14fe1a5efbdb2de5c009391d837.zip |
x86_64: Provide __sfp_handle_exceptions if compiler does not
Diffstat (limited to 'sysdeps/x86_64/configure')
-rwxr-xr-x | sysdeps/x86_64/configure | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure index e641e75d24..65cd4c9962 100755 --- a/sysdeps/x86_64/configure +++ b/sysdeps/x86_64/configure @@ -218,6 +218,37 @@ fi config_vars="$config_vars have-x86-apx = $libc_cv_x86_have_apx" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compiler standard library provides __sfp_handle_exceptions" >&5 +printf %s "checking whether compiler standard library provides __sfp_handle_exceptions... " >&6; } +if test ${libc_cv_sfp_handle_exceptions+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat > conftest.c <<EOF +int _start (void) { return 0; } +int __start (void) { return 0; } +void __sfp_handle_exceptions (int); +int main (void) { __sfp_handle_exceptions (0); return 0; } +EOF + if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $no_ssp -o conftest conftest.c -static -nostartfiles 1>&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + libc_cv_sfp_handle_exceptions=yes + else + libc_cv_sfp_handle_exceptions=no + fi + rm -rf conftest* +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_sfp_handle_exceptions" >&5 +printf "%s\n" "$libc_cv_sfp_handle_exceptions" >&6; } +if test x"$libc_cv_sfp_handle_exceptions" == xyes; then + printf "%s\n" "#define HAVE_X86_64_SFP_HANDLE_EXCEPTIONS 1" >>confdefs.h + +fi + test -n "$critic_missing" && as_fn_error $? " *** $critic_missing" "$LINENO" 5 |