diff --git a/config/gcc-stl-wrapper.template.h b/config/gcc-stl-wrapper.template.h index c714977d5dcc..943df64ba985 100644 --- a/config/gcc-stl-wrapper.template.h +++ b/config/gcc-stl-wrapper.template.h @@ -8,7 +8,9 @@ #ifndef mozilla_${HEADER}_h #define mozilla_${HEADER}_h -#if defined(__cpp_exceptions) && __cpp_exceptions +// For some reason, Apple's GCC refuses to honor -fno-exceptions when +// compiling ObjC. +#if defined(__EXCEPTIONS) && __EXCEPTIONS && !(__OBJC__ && __GNUC__ && XP_IOS) # error "STL code can only be used with -fno-exceptions" #endif diff --git a/old-configure.in b/old-configure.in index aad34312233a..9d995f68f3c8 100644 --- a/old-configure.in +++ b/old-configure.in @@ -603,8 +603,14 @@ MOZ_CXX11 AC_LANG_C -STL_FLAGS="-I${DIST}/stl_wrappers" -WRAP_STL_INCLUDES=1 +case "${OS_TARGET}" in +Darwin) + ;; +*) + STL_FLAGS="-I${DIST}/stl_wrappers" + WRAP_STL_INCLUDES=1 + ;; +esac if test "$MOZ_BUILD_APP" = "tools/crashreporter/injector"; then WRAP_STL_INCLUDES=