diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-03-15 16:01:29 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2024-04-17 16:12:40 -0300 |
commit | 58f8b01276ed3cc692545855430dc43e4ebd3c31 (patch) | |
tree | 2af5b1f4f499cc3ab03c1898354eda2c953fece3 /configure | |
parent | 5e40fc59009c7247b974d161ba50da4c237b66a6 (diff) | |
download | glibc-58f8b01276ed3cc692545855430dc43e4ebd3c31.tar.gz glibc-58f8b01276ed3cc692545855430dc43e4ebd3c31.tar.xz glibc-58f8b01276ed3cc692545855430dc43e4ebd3c31.zip |
Use -frounding-math iff compiler supports it
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/configure b/configure index d31af0b137..361bec7d20 100755 --- a/configure +++ b/configure @@ -7344,6 +7344,30 @@ printf "%s\n" "$libc_cv_cc_signaling_nans" >&6; } config_vars="$config_vars config-cflags-signaling-nans = $libc_cv_cc_signaling_nans" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for compiler option -frounding-math" >&5 +printf %s "checking for compiler option -frounding-math... " >&6; } +if test ${libc_cv_cc_rounding_math+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if { ac_try='${CC-cc} -Werror -frounding-math -xc /dev/null -S -o /dev/null' + { { 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_cc_rounding_math=-frounding-math +else $as_nop + libc_cv_cc_rounding_math= +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_rounding_math" >&5 +printf "%s\n" "$libc_cv_cc_rounding_math" >&6; } +config_vars="$config_vars +config-cflags-frounding-math = $libc_cv_cc_rounding_math" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-tree-loop-distribute-patterns with \ __attribute__ ((__optimize__))" >&5 printf %s "checking if $CC accepts -fno-tree-loop-distribute-patterns with \ |