diff options
author | Michael Matz <matz@gcc.gnu.org> | 2011-11-03 17:17:07 +0000 |
---|---|---|
committer | Michael Matz <matz@gcc.gnu.org> | 2011-11-03 17:17:07 +0000 |
commit | e941124721742b4972785960645a57178fabb71c (patch) | |
tree | 4343503ebcbfe34ff7e06478572708b57fff1bf4 /gcc/configure | |
parent | af8d2409beff727cf7d29025c09abded080d4cf7 (diff) | |
download | gcc-e941124721742b4972785960645a57178fabb71c.zip gcc-e941124721742b4972785960645a57178fabb71c.tar.gz gcc-e941124721742b4972785960645a57178fabb71c.tar.bz2 |
re PR bootstrap/50857 (The compiler is built with exceptions and RTTI enabled)
libcpp/
PR bootstrap/50857
* configure.ac: Check for -fno-exceptions -fno-rtti.
* configure: Regenerate.
* Makefile.in (NOEXCEPTION_FLAGS): New flag.
(ALL_CXXFLAGS): Use it.
gcc/
PR bootstrap/50857
* configure.ac: Check for -fno-exceptions -fno-rtti.
* configure: Regenerate.
* Makefile.in (NOEXCEPTION_FLAGS): New flag.
(ALL_CXXFLAGS): Use it.
From-SVN: r180833
Diffstat (limited to 'gcc/configure')
-rwxr-xr-x | gcc/configure | 46 |
1 files changed, 44 insertions, 2 deletions
diff --git a/gcc/configure b/gcc/configure index 35dbdd8..99334ce 100755 --- a/gcc/configure +++ b/gcc/configure @@ -771,6 +771,7 @@ valgrind_path_defines valgrind_path TREEBROWSER nocommon_flag +noexception_flags warn_cxxflags warn_cflags c_strict_warn @@ -6613,6 +6614,47 @@ fi +# Disable exceptions and RTTI if building with g++ +noexception_flags= +save_CFLAGS="$CFLAGS" +for option in -fno-exceptions -fno-rtti; do + 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:+ }$option" +fi + done +CFLAGS="$save_CFLAGS" + + # Enable expensive internal checks is_release= if test x"`cat $srcdir/DEV-PHASE`" != xexperimental; then @@ -18045,7 +18087,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18047 "configure" +#line 18090 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -18151,7 +18193,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18153 "configure" +#line 18196 "configure" #include "confdefs.h" #if HAVE_DLFCN_H |