OSDN Git Service

* config.host (*-*-openbsd*): Add t-eh-dw2-dip to tmake_file.
authorgerald <gerald@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 6 Oct 2012 21:55:06 +0000 (21:55 +0000)
committergerald <gerald@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 6 Oct 2012 21:55:06 +0000 (21:55 +0000)
* unwind-dw2-fde-dip.c: Don't include <elf.h> on OpenBSD.
(USE_PT_GNU_EH_FRAME): Define for OpenBSD.
(ElfW): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@192172 138bc75d-0d04-0410-961f-82ee72b054a4

libgcc/ChangeLog
libgcc/config.host
libgcc/unwind-dw2-fde-dip.c

index 1e8640a..e39f775 100644 (file)
@@ -1,3 +1,10 @@
+2012-10-06  Mark Kettenis  <kettenis@openbsd.org>
+
+       * 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.
+                               
 2012-09-20  Release Manager
 
        * GCC 4.7.2 released.
index ef9791b..617254e 100644 (file)
@@ -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"
index f57dc8c..a048495 100644 (file)
@@ -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"
 #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