PR 3591, PR 5676 - mcore C++ (take 2)

Jakub Jelinek jakub@redhat.com
Mon Mar 25 04:03:00 GMT 2002


Hi!

Ok to commit the following to fix PR 5676?

2002-03-25  Jakub Jelinek  <jakub@redhat.com>

	PR target/5676
	* acinclude.m4 (GLIBCPP_ENABLE_SJLJ_EXCEPTIONS): Pass -fexceptions
	explicitely.
	* aclocal.m4: Rebuilt.
	* configure: Rebuilt.
	* configure.target (mcore-*-pe*): Add -frtti -fno-exceptions
	by default to c++ flags.

2002-03-22  Nick Clifton  <nickc@cambridge.redhat.com>

	* config/mcore/mcore.h (CC1_SPEC): Define only if not already
	defined.  Do not disable exceptions or rtti.
	* config/mcore/mcore-pe.h (CC1_SPEC): Define before including
	mcore.h.  Disable exceptions and rtti, since they are not
	supported by EPOC.

--- libstdc++-v3/acinclude.m4.jj	Thu Mar 14 16:26:14 2002
+++ libstdc++-v3/acinclude.m4	Fri Mar 22 18:12:00 2002
@@ -1389,7 +1389,7 @@ void foo()
 }
 EOF
    old_CXXFLAGS="$CXXFLAGS"  
-   CXXFLAGS=-S
+   CXXFLAGS="-S -fexceptions"
    if AC_TRY_EVAL(ac_compile); then
      if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
        enable_sjlj_exceptions=yes
--- libstdc++-v3/aclocal.m4.jj	Thu Mar 14 16:26:14 2002
+++ libstdc++-v3/aclocal.m4	Fri Mar 22 18:23:35 2002
@@ -1401,7 +1401,7 @@ void foo()
 }
 EOF
    old_CXXFLAGS="$CXXFLAGS"  
-   CXXFLAGS=-S
+   CXXFLAGS="-S -fexceptions"
    if AC_TRY_EVAL(ac_compile); then
      if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
        enable_sjlj_exceptions=yes
--- libstdc++-v3/configure.jj	Mon Mar 18 23:27:02 2002
+++ libstdc++-v3/configure	Fri Mar 22 18:23:49 2002
@@ -3945,7 +3945,7 @@ void foo()
 }
 EOF
    old_CXXFLAGS="$CXXFLAGS"  
-   CXXFLAGS=-S
+   CXXFLAGS="-S -fexceptions"
    if { (eval echo configure:3950: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
      if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
        enable_sjlj_exceptions=yes
--- libstdc++-v3/configure.target.jj	Wed Jan 23 16:32:17 2002
+++ libstdc++-v3/configure.target	Sat Mar 23 23:56:54 2002
@@ -130,6 +130,13 @@ case "${target}" in
    *-*-irix*)
      ATOMICITYH=$os_include_dir
      ;;
+   mcore-*-pe*)
+     # The EPOC C++ environment does not support exceptions.
+     if test -z "$enable_cxx_flags"; then
+       enable_cxx_flags="-frtti -fno-exceptions"
+     fi
+     ATOMICITYH=$cpu_include_dir
+     ;;
    *)
      ATOMICITYH=$cpu_include_dir
      ;;
--- gcc/config/mcore/mcore.h.jj	Wed Jan 16 12:34:34 2002
+++ gcc/config/mcore/mcore.h	Fri Mar 22 18:25:18 2002
@@ -178,9 +178,10 @@ extern const char * mcore_stack_incremen
      N_("Maximum amount for a single stack increment operation")}	\
 }
 
+#ifndef CC1_SPEC
 /* The MCore ABI says that bitfields are unsigned by default. */
-/* The EPOC C++ environment does not support exceptions.  */
-#define CC1_SPEC "-funsigned-bitfields %{!DIN_GCC:-fno-rtti} %{!DIN_GCC:-fno-exceptions}"
+#define CC1_SPEC "-funsigned-bitfields"
+#endif
 
 /* What options are we going to default to specific settings when
    -O* happens; the user can subsequently override these settings.
--- gcc/config/mcore/mcore-pe.h.jj	Tue Nov 20 00:31:35 2001
+++ gcc/config/mcore/mcore-pe.h	Fri Mar 22 18:25:18 2002
@@ -24,6 +24,10 @@ Boston, MA 02111-1307, USA.  */
 
 #define SUBTARGET_CPP_PREDEFINES " -D__pe__"
 
+/* The MCore ABI says that bitfields are unsigned by default.  */
+/* The EPOC C++ environment does not support exceptions.  */
+#define CC1_SPEC "-funsigned-bitfields %{!DIN_GCC:-fno-rtti} %{!DIN_GCC:-fno-exceptions}"
+
 #include "svr3.h"
 #include "mcore/mcore.h"
 #include "dbxcoff.h"

	Jakub



More information about the Gcc-patches mailing list