summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>1999-02-02 18:09:19 +0000
committerMarc Espie <espie@cvs.openbsd.org>1999-02-02 18:09:19 +0000
commitbcd8667f4722cbb3b96946ddea33356473b5f0d6 (patch)
tree753512d3a215989013942fbac4c5f7359934b283
parent25b8318585ccffb36b39ab1d921780d38f8fad84 (diff)
Fix DWARF2_UNWIND_INFO properly, e.g., so that the same fragment works
with gcc 2.8.1 and egcs. Problem reported by millert@
-rw-r--r--gnu/usr.bin/gcc/config/alpha/openbsd.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/gnu/usr.bin/gcc/config/alpha/openbsd.h b/gnu/usr.bin/gcc/config/alpha/openbsd.h
index f92ffa70e33..5acc83f56ba 100644
--- a/gnu/usr.bin/gcc/config/alpha/openbsd.h
+++ b/gnu/usr.bin/gcc/config/alpha/openbsd.h
@@ -95,6 +95,18 @@ Boston, MA 02111-1307, USA. */
/* We're not ELF yet */
#undef HAS_INIT_SECTION
-/* can't use dwarf2-style exception handling as we're not elf... */
+/* Special handling, refer to defaults.h for the logic behind it:
+ if INCOMING_RETURN_ADDR_RTX is defined and DWARF2_UNWIND_INFO is
+ not, DWARF2_UNWIND_INFO becomes the default. Logically, this should
+ depend on the output format being/not being ELF. But we can't check
+ that directly. And INCOMING_RETURN_ADDR_RTX was added to alpha.h post
+ 2.8.1. The following construct should work for all gcc versions.
+ */
+
+/* We dont't default to dwarf2-style exception handling as we're not
+ elf... */
+#ifdef INCOMING_RETURN_ADDR_RTX
#undef DWARF2_UNWIND_INFO
#define DWARF2_UNWIND_INFO 0
+#endif
+