From 61f3f4ae6d8082897bbddfbab034d4e49378da91 Mon Sep 17 00:00:00 2001 From: Mitchell Field Date: Fri, 21 Oct 2011 18:56:25 +0100 Subject: [PATCH] Bug 593768 - Remove --enable-cpp-exceptions configure option; r=ted --- config/autoconf.mk.in | 1 - config/rules.mk | 3 --- configure.in | 29 ++--------------------------- js/src/config/autoconf.mk.in | 1 - js/src/config/rules.mk | 3 --- js/src/configure.in | 27 +-------------------------- 6 files changed, 3 insertions(+), 61 deletions(-) diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in index ad98f4852c3..600bf6fcac5 100644 --- a/config/autoconf.mk.in +++ b/config/autoconf.mk.in @@ -312,7 +312,6 @@ MOZ_OPTIMIZE_LDFLAGS = @MOZ_OPTIMIZE_LDFLAGS@ MOZ_OPTIMIZE_SIZE_TWEAK = @MOZ_OPTIMIZE_SIZE_TWEAK@ MOZ_RTTI_FLAGS_ON = @_MOZ_RTTI_FLAGS_ON@ -MOZ_EXCEPTIONS_FLAGS_ON = @_MOZ_EXCEPTIONS_FLAGS_ON@ PROFILE_GEN_CFLAGS = @PROFILE_GEN_CFLAGS@ PROFILE_GEN_LDFLAGS = @PROFILE_GEN_LDFLAGS@ diff --git a/config/rules.mk b/config/rules.mk index e9d9414aa49..bdeb86d599c 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -362,9 +362,6 @@ endif endif # !GNU_CC -ifdef ENABLE_CXX_EXCEPTIONS -CXXFLAGS += $(MOZ_EXCEPTIONS_FLAGS_ON) -DMOZ_CPP_EXCEPTIONS=1 -endif # ENABLE_CXX_EXCEPTIONS endif # WINNT ifeq ($(SOLARIS_SUNPRO_CXX),1) diff --git a/configure.in b/configure.in index 556407aefc6..f50e1b0feb9 100644 --- a/configure.in +++ b/configure.in @@ -755,8 +755,6 @@ case "$target" in _MOZ_RTTI_FLAGS_ON='-GR' _MOZ_RTTI_FLAGS_OFF='-GR-' - _MOZ_EXCEPTIONS_FLAGS_ON='-EHsc' - _MOZ_EXCEPTIONS_FLAGS_OFF='' AC_DEFINE(HAVE_SEH_EXCEPTIONS) if test -n "$WIN32_REDIST_DIR"; then @@ -1545,8 +1543,6 @@ if test "$GNU_CC"; then ASFLAGS="$ASFLAGS -fPIC" _MOZ_RTTI_FLAGS_ON=${_COMPILER_PREFIX}-frtti _MOZ_RTTI_FLAGS_OFF=${_COMPILER_PREFIX}-fno-rtti - _MOZ_EXCEPTIONS_FLAGS_ON='-fexceptions' - _MOZ_EXCEPTIONS_FLAGS_OFF='-fno-exceptions' # Turn on GNU specific features # -Wall - turn on all warnings @@ -1604,7 +1600,7 @@ fi if test "$GNU_CXX"; then # FIXME: Let us build with strict aliasing. bug 414641. - CXXFLAGS="$CXXFLAGS -fno-strict-aliasing" + CXXFLAGS="$CXXFLAGS -fno-exceptions -fno-strict-aliasing" # Turn on GNU specific features _WARNINGS_CXXFLAGS="${_WARNINGS_CXXFLAGS} -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor" if test -z "$INTEL_CXX" -a -z "$CLANG_CXX"; then @@ -2490,9 +2486,7 @@ ia64*-hpux*) LIBS="-lCrun -lCstd -lc $LIBS" AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES) CFLAGS="$CFLAGS -xlibmieee -xstrconst -xbuiltin=%all -D__FUNCTION__=__func__" - CXXFLAGS="$CXXFLAGS -xlibmieee -xbuiltin=%all -features=tmplife,tmplrefstatic,extensions -norunpath -D__FUNCTION__=__func__ -template=no%extdef" - _MOZ_EXCEPTIONS_FLAGS_ON='-features=except' - _MOZ_EXCEPTIONS_FLAGS_OFF='-features=no%except' + CXXFLAGS="$CXXFLAGS -xlibmieee -xbuiltin=%all -features=tmplife,tmplrefstatic,extensions,no%except -norunpath -D__FUNCTION__=__func__ -template=no%extdef" LDFLAGS="-xildoff $LDFLAGS" if test -z "$CROSS_COMPILE" -a -f /usr/lib/ld/map.noexstk; then _SAVE_LDFLAGS=$LDFLAGS @@ -7747,24 +7741,6 @@ if test "$ac_nscap_nonconst_opeq_bug" = "yes" ; then fi fi # ! SKIP_COMPILER_CHECKS -dnl ======================================================== -dnl C++ exceptions (g++/VC/Sun only - for now) -dnl Should be smarter and check that the compiler does indeed have exceptions -dnl ======================================================== -MOZ_ARG_ENABLE_BOOL(cpp-exceptions, -[ --enable-cpp-exceptions Enable C++ exceptions ], -[ _MOZ_CPP_EXCEPTIONS=1 ], -[ _MOZ_CPP_EXCEPTIONS= ]) - -if test "$_MOZ_CPP_EXCEPTIONS"; then - _MOZ_EXCEPTIONS_FLAGS=$_MOZ_EXCEPTIONS_FLAGS_ON - AC_DEFINE(MOZ_CPP_EXCEPTIONS) -else - _MOZ_EXCEPTIONS_FLAGS=$_MOZ_EXCEPTIONS_FLAGS_OFF -fi - -AC_SUBST(_MOZ_EXCEPTIONS_FLAGS_ON) - AC_DEFINE(CPP_THROW_NEW, [throw()]) AC_LANG_C @@ -8421,7 +8397,6 @@ CFLAGS=`echo \ CXXFLAGS=`echo \ $_MOZ_RTTI_FLAGS \ - $_MOZ_EXCEPTIONS_FLAGS \ $_WARNINGS_CXXFLAGS \ $CXXFLAGS` diff --git a/js/src/config/autoconf.mk.in b/js/src/config/autoconf.mk.in index 4232641061d..7c9114cb586 100644 --- a/js/src/config/autoconf.mk.in +++ b/js/src/config/autoconf.mk.in @@ -150,7 +150,6 @@ MOZ_OPTIMIZE_LDFLAGS = @MOZ_OPTIMIZE_LDFLAGS@ MOZ_OPTIMIZE_SIZE_TWEAK = @MOZ_OPTIMIZE_SIZE_TWEAK@ MOZ_RTTI_FLAGS_ON = @_MOZ_RTTI_FLAGS_ON@ -MOZ_EXCEPTIONS_FLAGS_ON = @_MOZ_EXCEPTIONS_FLAGS_ON@ PROFILE_GEN_CFLAGS = @PROFILE_GEN_CFLAGS@ PROFILE_GEN_LDFLAGS = @PROFILE_GEN_LDFLAGS@ diff --git a/js/src/config/rules.mk b/js/src/config/rules.mk index e9d9414aa49..bdeb86d599c 100644 --- a/js/src/config/rules.mk +++ b/js/src/config/rules.mk @@ -362,9 +362,6 @@ endif endif # !GNU_CC -ifdef ENABLE_CXX_EXCEPTIONS -CXXFLAGS += $(MOZ_EXCEPTIONS_FLAGS_ON) -DMOZ_CPP_EXCEPTIONS=1 -endif # ENABLE_CXX_EXCEPTIONS endif # WINNT ifeq ($(SOLARIS_SUNPRO_CXX),1) diff --git a/js/src/configure.in b/js/src/configure.in index 0bf21eabccf..8d762221839 100644 --- a/js/src/configure.in +++ b/js/src/configure.in @@ -752,8 +752,6 @@ case "$target" in _MOZ_RTTI_FLAGS_ON='-GR' _MOZ_RTTI_FLAGS_OFF='-GR-' - _MOZ_EXCEPTIONS_FLAGS_ON='-EHsc' - _MOZ_EXCEPTIONS_FLAGS_OFF='' dnl Ensure that mt.exe is 'Microsoft (R) Manifest Tool', dnl not something else like "magnetic tape manipulation utility". @@ -1491,8 +1489,6 @@ if test "$GNU_CC"; then ASFLAGS="$ASFLAGS -fPIC" _MOZ_RTTI_FLAGS_ON=${_COMPILER_PREFIX}-frtti _MOZ_RTTI_FLAGS_OFF=${_COMPILER_PREFIX}-fno-rtti - _MOZ_EXCEPTIONS_FLAGS_ON='-fexceptions' - _MOZ_EXCEPTIONS_FLAGS_OFF='-fno-exceptions' # Turn on GNU specific features # -Wall - turn on all warnings @@ -2336,9 +2332,7 @@ ia64*-hpux*) LIBS="-lCrun -lCstd -lc $LIBS" AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES) CFLAGS="$CFLAGS -xlibmieee -xstrconst -xbuiltin=%all -D__FUNCTION__=__func__" - CXXFLAGS="$CXXFLAGS -xlibmieee -xbuiltin=%all -features=tmplife,tmplrefstatic,extensions -norunpath -D__FUNCTION__=__func__ -template=no%extdef" - _MOZ_EXCEPTIONS_FLAGS_ON='-features=except' - _MOZ_EXCEPTIONS_FLAGS_OFF='-features=no%except' + CXXFLAGS="$CXXFLAGS -xlibmieee -xbuiltin=%all -features=tmplife,tmplrefstatic,extensions,no%except -norunpath -D__FUNCTION__=__func__ -template=no%extdef" LDFLAGS="-xildoff $LDFLAGS" if test -z "$CROSS_COMPILE" -a -f /usr/lib/ld/map.noexstk; then _SAVE_LDFLAGS=$LDFLAGS @@ -4856,24 +4850,6 @@ fi AC_SUBST(_MOZ_RTTI_FLAGS_ON) -dnl ======================================================== -dnl C++ exceptions (g++/VC/Sun only - for now) -dnl Should be smarter and check that the compiler does indeed have exceptions -dnl ======================================================== -MOZ_ARG_ENABLE_BOOL(cpp-exceptions, -[ --enable-cpp-exceptions Enable C++ exceptions ], -[ _MOZ_CPP_EXCEPTIONS=1 ], -[ _MOZ_CPP_EXCEPTIONS= ]) - -if test "$_MOZ_CPP_EXCEPTIONS"; then - _MOZ_EXCEPTIONS_FLAGS=$_MOZ_EXCEPTIONS_FLAGS_ON - AC_DEFINE(MOZ_CPP_EXCEPTIONS) -else - _MOZ_EXCEPTIONS_FLAGS=$_MOZ_EXCEPTIONS_FLAGS_OFF -fi - -AC_SUBST(_MOZ_EXCEPTIONS_FLAGS_ON) - AC_DEFINE(CPP_THROW_NEW, [throw()]) AC_LANG_C @@ -5138,7 +5114,6 @@ CFLAGS=`echo \ CXXFLAGS=`echo \ $_MOZ_RTTI_FLAGS \ - $_MOZ_EXCEPTIONS_FLAGS \ $_WARNINGS_CXXFLAGS \ $CXXFLAGS`