summaryrefslogtreecommitdiff
path: root/libgcc/unwind-dw2-fde-dip.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@openbsd.org>2012-10-05 23:35:55 +0000
committerGerald Pfeifer <gerald@gcc.gnu.org>2012-10-05 23:35:55 +0000
commit8eaee0f0f13cba020ea629f7ba60e1d79243bef1 (patch)
tree240ae56afd2e9fe2d09086d087498ae315bf31a4 /libgcc/unwind-dw2-fde-dip.c
parentd2edfb151d3fa8dcc5516aaa3cfb99e53d5aaadf (diff)
config.host (*-*-openbsd*): Add t-eh-dw2-dip to tmake_file.
* config.host (*-*-openbsd*): Add t-eh-dw2-dip to tmake_file. * unwind-dw2-fde-dip.c: Don't include <elf.h> on OpenBSD. (USE_PT_GNU_EH_FRAME): Define for OpenBSD. (ElfW): Likewise. From-SVN: r192148
Diffstat (limited to 'libgcc/unwind-dw2-fde-dip.c')
-rw-r--r--libgcc/unwind-dw2-fde-dip.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libgcc/unwind-dw2-fde-dip.c b/libgcc/unwind-dw2-fde-dip.c
index 92f8ab54644..2ce3af80b15 100644
--- a/libgcc/unwind-dw2-fde-dip.c
+++ b/libgcc/unwind-dw2-fde-dip.c
@@ -33,7 +33,7 @@
#include "tconfig.h"
#include "tsystem.h"
-#ifndef inhibit_libc
+#if !defined(inhibit_libc) && !defined(__OpenBSD__)
#include <elf.h> /* Get DT_CONFIG. */
#endif
#include "coretypes.h"
@@ -65,6 +65,12 @@
#endif
#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
+ && defined(__OpenBSD__)
+# define ElfW(type) Elf_##type
+# define USE_PT_GNU_EH_FRAME
+#endif
+
+#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \
&& defined(TARGET_DL_ITERATE_PHDR) \
&& defined(__sun__) && defined(__svr4__)
# define USE_PT_GNU_EH_FRAME