diff options
author | Simon Marchi <simon.marchi@ericsson.com> | 2018-06-15 23:07:44 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2018-06-18 09:37:46 -0400 |
commit | f57a3bca61357a599be99552aaa6084bd8276682 (patch) | |
tree | 57b759b9dcff9a0af002b351cefd0f954a22e57c /libdecnumber/configure | |
parent | b0f49e3fd776bd64d55c76f001f353c1327d3001 (diff) | |
download | binutils-f57a3bca61357a599be99552aaa6084bd8276682.zip binutils-f57a3bca61357a599be99552aaa6084bd8276682.tar.gz binutils-f57a3bca61357a599be99552aaa6084bd8276682.tar.bz2 |
libdecnumber: Sync with GCC
Diffstat (limited to 'libdecnumber/configure')
-rwxr-xr-x | libdecnumber/configure | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/libdecnumber/configure b/libdecnumber/configure index 35baf07..4cb732e 100755 --- a/libdecnumber/configure +++ b/libdecnumber/configure @@ -613,6 +613,7 @@ EGREP GREP CPP WERROR +nolto_flags WARN_PEDANTIC WARN_CFLAGS AUTOHEADER @@ -3382,6 +3383,64 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +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 + +nolto_flags= +save_CFLAGS="$CFLAGS" +for real_option in -fno-lto; do + # Do the check with the no- prefix removed since gcc silently + # accepts any -Wno-* option on purpose + case $real_option in + -Wno-*) option=-W`expr x$real_option : 'x-Wno-\(.*\)'` ;; + *) option=$real_option ;; + esac + as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh` + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5 +$as_echo_n "checking whether $CC supports $option... " >&6; } +if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + CFLAGS="$option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$as_acx_Woption=yes" +else + eval "$as_acx_Woption=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +eval ac_res=\$$as_acx_Woption + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then : + nolto_flags="$nolto_flags${nolto_flags:+ }$real_option" +fi + done +CFLAGS="$save_CFLAGS" +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 + + + # Only enable with --enable-werror-always until existing warnings are # corrected. ac_ext=c |