From 8eaee0f0f13cba020ea629f7ba60e1d79243bef1 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Fri, 5 Oct 2012 23:35:55 +0000 Subject: [PATCH] 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 on OpenBSD. (USE_PT_GNU_EH_FRAME): Define for OpenBSD. (ElfW): Likewise. From-SVN: r192148 --- libgcc/ChangeLog | 7 +++++++ libgcc/config.host | 2 +- libgcc/unwind-dw2-fde-dip.c | 8 +++++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 7bd8312..0b6f592 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,10 @@ +2012-10-06 Mark Kettenis + + * config.host (*-*-openbsd*): Add t-eh-dw2-dip to tmake_file. + * unwind-dw2-fde-dip.c: Don't include on OpenBSD. + (USE_PT_GNU_EH_FRAME): Define for OpenBSD. + (ElfW): Likewise. + 2012-10-05 Jonathan Wakely PR other/53889 diff --git a/libgcc/config.host b/libgcc/config.host index 3689024..763f6c3 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -213,7 +213,7 @@ case ${host} in esac ;; *-*-openbsd*) - tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic" + tmake_file="$tmake_file t-crtstuff-pic t-libgcc-pic t-eh-dw2-dip" case ${target_thread_file} in posix) tmake_file="$tmake_file t-openbsd-thread" diff --git a/libgcc/unwind-dw2-fde-dip.c b/libgcc/unwind-dw2-fde-dip.c index 92f8ab5..2ce3af8 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 /* 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 -- 2.7.4