This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] PR target/35222 Force use of sjlj exceptions on hppa*-*-hpux10*


The attached change forces the use of sjlj exceptions on hpux10.  This
avoids the linker problem reported in PR 35222.  I was unable to find any
way to handle the relocation issues associated with references in EH
data to code symbols in the comdat subspaces used for one-only support
on hpux10.

The enclosed change forces the definition of CONFIG_SJLJ_EXCEPTIONS
to 1 for hpux10.  This seemed like a better approach than having the
build fail if a user fails to supply --enable-sjlj-exceptions.  The
latter could be implemented with a PA backend specific change.

The patch has has been mainly tested on hppa2.0w-hp-hpux11.11 using
the one-only support used with on hpux10.  I believe that I have
checked all the enable/disable permutations, and that the warning
message appears correctly.

Ok for trunk through 4.2?

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

2008-03-03  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>

	PR target/35222
	* configure.ac (CONFIG_SJLJ_EXCEPTIONS): Force SJLJ exceptions
	on hpux10.
	* configure: Rebuilt.

Index: configure.ac
===================================================================
--- configure.ac	(revision 132839)
+++ configure.ac	(working copy)
@@ -1172,9 +1172,29 @@
 AC_ARG_ENABLE(sjlj-exceptions,
 [  --enable-sjlj-exceptions
                           arrange to use setjmp/longjmp exception handling],
-[sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
-AC_DEFINE_UNQUOTED(CONFIG_SJLJ_EXCEPTIONS, $sjlj,
-  [Define 0/1 to force the choice for exception handling model.])])
+[case $target in
+  *-*-hpux10*)
+    if test $enableval != yes; then
+      AC_MSG_WARN([dwarf2 exceptions not supported, sjlj exceptions forced])
+      enableval=yes
+    fi
+    ;;
+esac
+force_sjlj_exceptions=yes],
+[case $target in
+  *-*-hpux10*)
+    force_sjlj_exceptions=yes
+    enableval=yes
+    ;;
+  *)
+    force_sjlj_exceptions=no
+    ;;
+esac])
+if test $force_sjlj_exceptions = yes; then
+  sjlj=`if test $enableval = yes; then echo 1; else echo 0; fi`
+  AC_DEFINE_UNQUOTED(CONFIG_SJLJ_EXCEPTIONS, $sjlj,
+    [Define 0/1 to force the choice for exception handling model.])
+fi
 
 # For platforms with the unwind ABI which includes an unwind library,
 # libunwind, we can choose to use the system libunwind.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]