X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=libcpp%2Fconfigure;h=1e351faac3c650b9b4f83499a919e07f32bc3bc7;hb=d8646cd82c58416f0aebc01101681efce5840874;hp=c400d23a93df298f37b9079d1e92991a808349bf;hpb=6b4db1bd8cef61c66671c8249c21f6fdc8ccce06;p=pf3gnuchains%2Fgcc-fork.git diff --git a/libcpp/configure b/libcpp/configure index c400d23a93d..1e351faac3c 100755 --- a/libcpp/configure +++ b/libcpp/configure @@ -616,6 +616,7 @@ CCDEPMODE DEPDIR am__leading_dot WERROR +noexception_flags WARN_PEDANTIC c_warn warn @@ -4687,8 +4688,14 @@ test -n "$AUTOHEADER" || AUTOHEADER="$MISSING autoheader" warn= save_CFLAGS="$CFLAGS" -for option in -W -Wall -Wwrite-strings \ +for real_option in -W -Wall -Wno-narrowing -Wwrite-strings \ -Wmissing-format-attribute; 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 @@ -4720,15 +4727,21 @@ 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 : - warn="$warn${warn:+ }$option" + warn="$warn${warn:+ }$real_option" fi done CFLAGS="$save_CFLAGS" c_warn= save_CFLAGS="$CFLAGS" -for option in -Wstrict-prototypes -Wmissing-prototypes \ +for real_option in -Wstrict-prototypes -Wmissing-prototypes \ -Wold-style-definition -Wc++-compat; 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 @@ -4760,20 +4773,22 @@ 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 : - c_warn="$c_warn${c_warn:+ }$option" + c_warn="$c_warn${c_warn:+ }$real_option" fi done CFLAGS="$save_CFLAGS" WARN_PEDANTIC= +# Do the check with the no- prefix removed from the warning options +# since gcc silently accepts any -Wno-* option on purpose if test "$GCC" = yes; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pedantic -Wno-long-long" >&5 -$as_echo_n "checking whether $CC supports -pedantic -Wno-long-long... " >&6; } -if test "${acx_cv_prog_cc_pedantic__Wno_long_long+set}" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pedantic -Wlong-long" >&5 +$as_echo_n "checking whether $CC supports -pedantic -Wlong-long... " >&6; } +if test "${acx_cv_prog_cc_pedantic__Wlong_long+set}" = set; then : $as_echo_n "(cached) " >&6 else save_CFLAGS="$CFLAGS" -CFLAGS="-pedantic -Wno-long-long" +CFLAGS="-pedantic -Wlong-long" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4786,22 +4801,69 @@ main () } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - acx_cv_prog_cc_pedantic__Wno_long_long=yes + acx_cv_prog_cc_pedantic__Wlong_long=yes else - acx_cv_prog_cc_pedantic__Wno_long_long=no + acx_cv_prog_cc_pedantic__Wlong_long=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_prog_cc_pedantic__Wno_long_long" >&5 -$as_echo "$acx_cv_prog_cc_pedantic__Wno_long_long" >&6; } -if test $acx_cv_prog_cc_pedantic__Wno_long_long = yes; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cv_prog_cc_pedantic__Wlong_long" >&5 +$as_echo "$acx_cv_prog_cc_pedantic__Wlong_long" >&6; } +if test $acx_cv_prog_cc_pedantic__Wlong_long = yes; then : WARN_PEDANTIC="$WARN_PEDANTIC${WARN_PEDANTIC:+ }-pedantic -Wno-long-long" fi fi +# Disable exceptions and RTTI if building with g++ +noexception_flags= +save_CFLAGS="$CFLAGS" +for real_option in -fno-exceptions -fno-rtti; 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 : + noexception_flags="$noexception_flags${noexception_flags:+ }$real_option" +fi + done +CFLAGS="$save_CFLAGS" + + # Only enable with --enable-werror-always until existing warnings are # corrected. WERROR= @@ -7308,6 +7370,7 @@ fi case $target in alpha*-*-* | \ arm*-*-*eabi* | \ + arm*-*-rtems[.0-9]* | \ arm*-*-symbianelf* | \ x86_64-*-* | \ ia64-*-* | \ @@ -7320,7 +7383,8 @@ case $target in s390*-*-* | \ sparc*-*-* | \ spu-*-* | \ - sh[123456789lbe]*-*-* | sh-*-*) + sh[123456789lbe]*-*-* | sh-*-* | \ + tilegx-*-* | tilepro-*-* ) need_64bit_hwint=yes ;; *) need_64bit_hwint=no ;;