From 58cd1d70dd8cd4b95773c0487a5d2aecad2b4dc1 Mon Sep 17 00:00:00 2001 From: Rainer Orth Date: Fri, 3 Jun 2011 18:30:39 +0000 Subject: [PATCH] linux.h (MD_UNWIND_SUPPORT): Remove. gcc: * config/alpha/linux.h (MD_UNWIND_SUPPORT): Remove. * config/alpha/osf5.h (MD_UNWIND_SUPPORT): Remove. * config/alpha/vms.h (MD_UNWIND_SUPPORT): Remove. * config/bfin/linux.h (MD_UNWIND_SUPPORT): Remove. * config/bfin/uclinux.h (MD_UNWIND_SUPPORT): Remove. * config/i386/linux.h (MD_UNWIND_SUPPORT): Remove. * config/i386/linux64.h (MD_UNWIND_SUPPORT): Remove. * config/i386/sol2.h (MD_UNWIND_SUPPORT): Remove. * config/i386/mingw32.h (MD_UNWIND_SUPPORT): Remove. * config/ia64/linux.h (MD_UNWIND_SUPPORT): Remove. * config/ia64/vms.h (MD_UNWIND_SUPPORT): Remove. * config/m68k/linux.h (MD_UNWIND_SUPPORT): Remove. * config/mips/linux.h (MD_UNWIND_SUPPORT): Remove. * config/pa/pa-hpux.h (MD_UNWIND_SUPPORT): Remove. * config/pa/pa32-linux.h (MD_UNWIND_SUPPORT): Remove. * config/rs6000/darwin.h (MD_UNWIND_SUPPORT): Remove. * config/rs6000/linux.h (MD_UNWIND_SUPPORT): Remove. * config/rs6000/linux64.h (MD_UNWIND_SUPPORT): Remove. * config/s390/linux.h (MD_UNWIND_SUPPORT): Remove. * config/s390/tpf.h (MD_UNWIND_SUPPORT): Remove. * config/sh/linux.h (MD_UNWIND_SUPPORT): Remove. * config/sparc/linux.h (MD_UNWIND_SUPPORT): Remove. * config/sparc/linux64.h (MD_UNWIND_SUPPORT): Remove. * config/sparc/sol2.h (MD_UNWIND_SUPPORT): Remove. * config/xtensa/linux.h (MD_UNWIND_SUPPORT): Remove. * config/alpha/linux-unwind.h: Move to ../libgcc/config/alpha. * config/alpha/osf5-unwind.h: Move to ../libgcc/config/alpha. * config/alpha/vms-unwind.h: Move to ../libgcc/config/alpha. * config/bfin/linux-unwind.h: Move to ../libgcc/config/bfin. * config/i386/linux-unwind.h: Move to ../libgcc/config/i386. * config/i386/sol2-unwind.h: Move to ../libgcc/config/i386. * config/i386/w32-unwind.h: Move to ../libgcc/config/i386. * config/ia64/linux-unwind.h: Move to ../libgcc/config/ia64. * config/ia64/vms-unwind.h: Move to ../libgcc/config/ia64. * config/m68k/linux-unwind.h: Move to ../libgcc/config/m68k. * config/mips/linux-unwind.h: Move to ../libgcc/config/mips. * config/pa/hpux-unwind.h: Move to ../libgcc/config/pa. * config/pa/linux-unwind.h: Move to ../libgcc/config/pa. * config/rs6000/darwin-unwind.h: Move to ../libgcc/config/rs6000. * config/rs6000/linux-unwind.h: Move to ../libgcc/config/rs6000. * config/s390/linux-unwind.h: Move to ../libgcc/config/s390. * config/s390/tpf-unwind.h: Move to ../libgcc/config/s390. * config/sh/linux-unwind.h: Move to ../libgcc/config/sh. * config/sparc/linux-unwind.h: Move to ../libgcc/config/sparc. * config/sparc/sol2-unwind.h: Move to ../libgcc/config/sparc. * config/xtensa/linux-unwind.h: Move to ../libgcc/config/xtensa. * config/darwin9.h (DARWIN_LIBSYSTEM_HAS_UNWIND): Remove. * system.h (MD_UNWIND_SUPPORT): Poison. * doc/tm.texi.in (Exception Handling, MD_UNWIND_SUPPORT): Remove. * doc/tm.texi: Regenerate. * unwind-dw2.c: Include md-unwind-support.h instead of MD_UNWIND_SUPPORT. * config/ia64/unwind-ia64.c: Likewise. * config/xtensa/unwind-dw2-xtensa.c: Likewise. libgcc: * config/alpha/linux-unwind.h: Move from ../gcc/config/alpha. * config/alpha/osf5-unwind.h: Move from ../gcc/config/alpha. * config/alpha/vms-unwind.h: Move from ../gcc/config/alpha. * config/bfin/linux-unwind.h: Move from ../gcc/config/bfin. * config/i386/linux-unwind.h: Move from ../gcc/config/i386. * config/i386/sol2-unwind.h: Move from ../gcc/config/i386. * config/i386/w32-unwind.h: Move from ../gcc/config/i386. Wrap in !__MINGW64__. * config/ia64/linux-unwind.h: Move from ../gcc/config/ia64. * config/ia64/vms-unwind.h: Move from ../gcc/config/ia64. * config/m68k/linux-unwind.h: Move from ../gcc/config/m68k. * config/mips/linux-unwind.h: Move from ../gcc/config/mips. * config/pa/hpux-unwind.h: Move from ../gcc/config/pa. * config/pa/linux-unwind.h: Move from ../gcc/config/pa. * config/rs6000/darwin-unwind.h: Move from ../gcc/config/rs6000. Wrap in !__LP64__. * config/rs6000/linux-unwind.h: Move from ../gcc/config/rs6000. * config/s390/linux-unwind.h: Move from ../gcc/config/s390. * config/s390/tpf-unwind.h: Move from ../gcc/config/s390. * config/sh/linux-unwind.h: Move from ../gcc/config/sh. * config/sparc/linux-unwind.h: Move from ../gcc/config/sparc. * config/sparc/sol2-unwind.h: Move from ../gcc/config/sparc. * config/xtensa/linux-unwind.h: Move from ../gcc/config/xtensa. * config/no-unwind.h: New file. * config.host (md_unwind_header): Document. Define. (alpha*-*-linux*, alpha*-dec-osf5.1*, alpha64-dec-*vms*, alpha*-dec-*vms*, bfin*-uclinux*, bfin*-linux-uclibc*, hppa*-*-linux*, hppa[12]*-*-hpux10*, hppa*64*-*-hpux11*, hppa[12]*-*-hpux11*): Set md_unwind_header. (i[34567]86-*-linux*): Handle i[34567]86-*-kopensolaris*-gnu. Set md_unwind_header. (x86_64-*-linux*, i[34567]86-*-solaris2*): Set md_unwind_header. (i[34567]86-*-cygwin*): Split from i[34567]86-*-mingw*. (i[34567]86-*-mingw*, ia64*-*-linux*, ia64-hp-*vms*, m68k-*-uclinux*, m68k-*-linux*, mips64*-*-linux*, mips*-*-linux*, powerpc-*-darwin*, powerpc-*-linux*, s390-*-linux*, s390x-*-linux*, s390x-ibm-tpf*, sh*-*-linux*, sparc-*-linux*, sparc*-*-solaris2*, sparc64-*-linux*, xtensa*-*-linux*): Set md_unwind_header. * configure.ac: Link md-unwind-support.h to $md_unwind_header. * configure: Regenerate. From-SVN: r174613 --- gcc/ChangeLog | 57 +++++++++++++++++++ gcc/config/alpha/linux.h | 4 +- gcc/config/alpha/osf5.h | 2 - gcc/config/alpha/vms.h | 8 --- gcc/config/bfin/linux.h | 2 - gcc/config/bfin/uclinux.h | 2 - gcc/config/darwin9.h | 5 +- gcc/config/i386/linux.h | 2 - gcc/config/i386/linux64.h | 2 - gcc/config/i386/mingw32.h | 6 -- gcc/config/i386/sol2.h | 2 - gcc/config/ia64/linux.h | 2 - gcc/config/ia64/unwind-ia64.c | 6 +- gcc/config/ia64/vms.h | 2 - gcc/config/m68k/linux.h | 2 - gcc/config/mips/linux.h | 2 - gcc/config/pa/pa-hpux.h | 6 +- gcc/config/pa/pa32-linux.h | 4 +- gcc/config/rs6000/darwin.h | 4 -- gcc/config/rs6000/linux.h | 2 - gcc/config/rs6000/linux64.h | 2 - gcc/config/s390/linux.h | 2 - gcc/config/s390/tpf.h | 2 - gcc/config/sh/linux.h | 2 - gcc/config/sparc/linux.h | 2 - gcc/config/sparc/linux64.h | 2 - gcc/config/sparc/sol2.h | 2 - gcc/config/xtensa/linux.h | 2 - gcc/config/xtensa/unwind-dw2-xtensa.c | 6 +- gcc/doc/tm.texi | 7 +-- gcc/doc/tm.texi.in | 7 +-- gcc/system.h | 3 +- gcc/unwind-dw2.c | 4 +- libgcc/ChangeLog | 45 +++++++++++++++ libgcc/config.host | 51 ++++++++++++++++- {gcc => libgcc}/config/alpha/linux-unwind.h | 0 {gcc => libgcc}/config/alpha/osf5-unwind.h | 0 {gcc => libgcc}/config/alpha/vms-unwind.h | 0 {gcc => libgcc}/config/bfin/linux-unwind.h | 0 {gcc => libgcc}/config/i386/linux-unwind.h | 0 {gcc => libgcc}/config/i386/sol2-unwind.h | 0 {gcc => libgcc}/config/i386/w32-unwind.h | 6 +- {gcc => libgcc}/config/ia64/linux-unwind.h | 0 {gcc => libgcc}/config/ia64/vms-unwind.h | 0 {gcc => libgcc}/config/m68k/linux-unwind.h | 0 {gcc => libgcc}/config/mips/linux-unwind.h | 0 libgcc/config/no-unwind.h | 2 + {gcc => libgcc}/config/pa/hpux-unwind.h | 0 {gcc => libgcc}/config/pa/linux-unwind.h | 0 {gcc => libgcc}/config/rs6000/darwin-unwind.h | 8 ++- {gcc => libgcc}/config/rs6000/linux-unwind.h | 0 {gcc => libgcc}/config/s390/linux-unwind.h | 0 {gcc => libgcc}/config/s390/tpf-unwind.h | 0 {gcc => libgcc}/config/sh/linux-unwind.h | 0 {gcc => libgcc}/config/sparc/linux-unwind.h | 0 {gcc => libgcc}/config/sparc/sol2-unwind.h | 0 {gcc => libgcc}/config/xtensa/linux-unwind.h | 0 libgcc/configure | 41 ++++++++++++- libgcc/configure.ac | 1 + 59 files changed, 218 insertions(+), 101 deletions(-) rename {gcc => libgcc}/config/alpha/linux-unwind.h (100%) rename {gcc => libgcc}/config/alpha/osf5-unwind.h (100%) rename {gcc => libgcc}/config/alpha/vms-unwind.h (100%) rename {gcc => libgcc}/config/bfin/linux-unwind.h (100%) rename {gcc => libgcc}/config/i386/linux-unwind.h (100%) rename {gcc => libgcc}/config/i386/sol2-unwind.h (100%) rename {gcc => libgcc}/config/i386/w32-unwind.h (98%) rename {gcc => libgcc}/config/ia64/linux-unwind.h (100%) rename {gcc => libgcc}/config/ia64/vms-unwind.h (100%) rename {gcc => libgcc}/config/m68k/linux-unwind.h (100%) rename {gcc => libgcc}/config/mips/linux-unwind.h (100%) create mode 100644 libgcc/config/no-unwind.h rename {gcc => libgcc}/config/pa/hpux-unwind.h (100%) rename {gcc => libgcc}/config/pa/linux-unwind.h (100%) rename {gcc => libgcc}/config/rs6000/darwin-unwind.h (88%) rename {gcc => libgcc}/config/rs6000/linux-unwind.h (100%) rename {gcc => libgcc}/config/s390/linux-unwind.h (100%) rename {gcc => libgcc}/config/s390/tpf-unwind.h (100%) rename {gcc => libgcc}/config/sh/linux-unwind.h (100%) rename {gcc => libgcc}/config/sparc/linux-unwind.h (100%) rename {gcc => libgcc}/config/sparc/sol2-unwind.h (100%) rename {gcc => libgcc}/config/xtensa/linux-unwind.h (100%) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 46ee4cfa1e5..94b105e2633 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,60 @@ +2011-06-03 Rainer Orth + + * config/alpha/linux.h (MD_UNWIND_SUPPORT): Remove. + * config/alpha/osf5.h (MD_UNWIND_SUPPORT): Remove. + * config/alpha/vms.h (MD_UNWIND_SUPPORT): Remove. + * config/bfin/linux.h (MD_UNWIND_SUPPORT): Remove. + * config/bfin/uclinux.h (MD_UNWIND_SUPPORT): Remove. + * config/i386/linux.h (MD_UNWIND_SUPPORT): Remove. + * config/i386/linux64.h (MD_UNWIND_SUPPORT): Remove. + * config/i386/sol2.h (MD_UNWIND_SUPPORT): Remove. + * config/i386/mingw32.h (MD_UNWIND_SUPPORT): Remove. + * config/ia64/linux.h (MD_UNWIND_SUPPORT): Remove. + * config/ia64/vms.h (MD_UNWIND_SUPPORT): Remove. + * config/m68k/linux.h (MD_UNWIND_SUPPORT): Remove. + * config/mips/linux.h (MD_UNWIND_SUPPORT): Remove. + * config/pa/pa-hpux.h (MD_UNWIND_SUPPORT): Remove. + * config/pa/pa32-linux.h (MD_UNWIND_SUPPORT): Remove. + * config/rs6000/darwin.h (MD_UNWIND_SUPPORT): Remove. + * config/rs6000/linux.h (MD_UNWIND_SUPPORT): Remove. + * config/rs6000/linux64.h (MD_UNWIND_SUPPORT): Remove. + * config/s390/linux.h (MD_UNWIND_SUPPORT): Remove. + * config/s390/tpf.h (MD_UNWIND_SUPPORT): Remove. + * config/sh/linux.h (MD_UNWIND_SUPPORT): Remove. + * config/sparc/linux.h (MD_UNWIND_SUPPORT): Remove. + * config/sparc/linux64.h (MD_UNWIND_SUPPORT): Remove. + * config/sparc/sol2.h (MD_UNWIND_SUPPORT): Remove. + * config/xtensa/linux.h (MD_UNWIND_SUPPORT): Remove. + * config/alpha/linux-unwind.h: Move to ../libgcc/config/alpha. + * config/alpha/osf5-unwind.h: Move to ../libgcc/config/alpha. + * config/alpha/vms-unwind.h: Move to ../libgcc/config/alpha. + * config/bfin/linux-unwind.h: Move to ../libgcc/config/bfin. + * config/i386/linux-unwind.h: Move to ../libgcc/config/i386. + * config/i386/sol2-unwind.h: Move to ../libgcc/config/i386. + * config/i386/w32-unwind.h: Move to ../libgcc/config/i386. + * config/ia64/linux-unwind.h: Move to ../libgcc/config/ia64. + * config/ia64/vms-unwind.h: Move to ../libgcc/config/ia64. + * config/m68k/linux-unwind.h: Move to ../libgcc/config/m68k. + * config/mips/linux-unwind.h: Move to ../libgcc/config/mips. + * config/pa/hpux-unwind.h: Move to ../libgcc/config/pa. + * config/pa/linux-unwind.h: Move to ../libgcc/config/pa. + * config/rs6000/darwin-unwind.h: Move to ../libgcc/config/rs6000. + * config/rs6000/linux-unwind.h: Move to ../libgcc/config/rs6000. + * config/s390/linux-unwind.h: Move to ../libgcc/config/s390. + * config/s390/tpf-unwind.h: Move to ../libgcc/config/s390. + * config/sh/linux-unwind.h: Move to ../libgcc/config/sh. + * config/sparc/linux-unwind.h: Move to ../libgcc/config/sparc. + * config/sparc/sol2-unwind.h: Move to ../libgcc/config/sparc. + * config/xtensa/linux-unwind.h: Move to ../libgcc/config/xtensa. + * config/darwin9.h (DARWIN_LIBSYSTEM_HAS_UNWIND): Remove. + * system.h (MD_UNWIND_SUPPORT): Poison. + * doc/tm.texi.in (Exception Handling, MD_UNWIND_SUPPORT): Remove. + * doc/tm.texi: Regenerate. + * unwind-dw2.c: Include md-unwind-support.h instead of + MD_UNWIND_SUPPORT. + * config/ia64/unwind-ia64.c: Likewise. + * config/xtensa/unwind-dw2-xtensa.c: Likewise. + 2011-06-03 Jack Howarth * varpool.c (varpool_extra_name_alias): Return NULL, not false. diff --git a/gcc/config/alpha/linux.h b/gcc/config/alpha/linux.h index a1881c8168b..38dbdb0c8be 100644 --- a/gcc/config/alpha/linux.h +++ b/gcc/config/alpha/linux.h @@ -1,7 +1,7 @@ /* Definitions of target machine for GNU compiler, for Alpha Linux-based GNU systems. Copyright (C) 1996, 1997, 1998, 2002, 2003, 2004, 2005, 2006, 2007, 2009, - 2010 Free Software Foundation, Inc. + 2010, 2011 Free Software Foundation, Inc. Contributed by Richard Henderson. This file is part of GCC. @@ -84,8 +84,6 @@ along with GCC; see the file COPYING3. If not see #define USE_LD_AS_NEEDED 1 #endif -#define MD_UNWIND_SUPPORT "config/alpha/linux-unwind.h" - /* Define if long doubles should be mangled as 'g'. */ #define TARGET_ALTERNATE_LONG_DOUBLE_MANGLING diff --git a/gcc/config/alpha/osf5.h b/gcc/config/alpha/osf5.h index 7713b7ee045..995f35d4f32 100644 --- a/gcc/config/alpha/osf5.h +++ b/gcc/config/alpha/osf5.h @@ -274,5 +274,3 @@ __enable_execute_stack (void *addr) \ /* Handle #pragma extern_prefix. */ #define TARGET_HANDLE_PRAGMA_EXTERN_PREFIX 1 - -#define MD_UNWIND_SUPPORT "config/alpha/osf5-unwind.h" diff --git a/gcc/config/alpha/vms.h b/gcc/config/alpha/vms.h index 8e931033989..f730ea1b5dd 100644 --- a/gcc/config/alpha/vms.h +++ b/gcc/config/alpha/vms.h @@ -225,14 +225,6 @@ typedef struct {int num_args; enum avms_arg_type atypes[6];} avms_arg_info; #define LINK_EH_SPEC "vms-dwarf2eh.o%s " #define LINK_GCC_C_SEQUENCE_SPEC "%G" -#ifdef IN_LIBGCC2 -/* Get the definition for MD_FALLBACK_FRAME_STATE_FOR from a separate - file. This avoids having to recompile the world instead of libgcc only - when changes to this macro are exercised. */ - -#define MD_UNWIND_SUPPORT "config/alpha/vms-unwind.h" -#endif - #define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \ avms_asm_output_external (FILE, DECL, NAME) diff --git a/gcc/config/bfin/linux.h b/gcc/config/bfin/linux.h index cd15f48ed72..f91cf17f141 100644 --- a/gcc/config/bfin/linux.h +++ b/gcc/config/bfin/linux.h @@ -48,7 +48,5 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -dynamic-linker /lib/ld-uClibc.so.0} \ %{static}} -init __init -fini __fini" -#define MD_UNWIND_SUPPORT "config/bfin/linux-unwind.h" - #undef TARGET_SUPPORTS_SYNC_CALLS #define TARGET_SUPPORTS_SYNC_CALLS 1 diff --git a/gcc/config/bfin/uclinux.h b/gcc/config/bfin/uclinux.h index 354ff55a60b..da26be57606 100644 --- a/gcc/config/bfin/uclinux.h +++ b/gcc/config/bfin/uclinux.h @@ -32,8 +32,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see %{mfast-fp:-lbffastfp} %G %L %{mfast-fp:-lbffastfp} %G \ " -#define MD_UNWIND_SUPPORT "config/bfin/linux-unwind.h" - /* Like the definition in gcc.c, but for purposes of uClinux, every link is static. */ #define MFWRAP_SPEC " %{fmudflap|fmudflapth: \ diff --git a/gcc/config/darwin9.h b/gcc/config/darwin9.h index 82811837282..bb62dd4ca9f 100644 --- a/gcc/config/darwin9.h +++ b/gcc/config/darwin9.h @@ -1,5 +1,5 @@ /* Target definitions for Darwin (Mac OS X) systems. - Copyright (C) 2006, 2007, 2010 Free Software Foundation, Inc. + Copyright (C) 2006, 2007, 2010, 2011 Free Software Foundation, Inc. Contributed by Apple Inc. This file is part of GCC. @@ -35,9 +35,6 @@ along with GCC; see the file COPYING3. If not see /* Tell collect2 to run dsymutil for us as necessary. */ #define COLLECT_RUN_DSYMUTIL 1 -/* libSystem contains unwind information for signal frames. */ -#define DARWIN_LIBSYSTEM_HAS_UNWIND - #undef ASM_OUTPUT_ALIGNED_COMMON #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \ do { \ diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h index 833416d59a5..73681fe82f6 100644 --- a/gcc/config/i386/linux.h +++ b/gcc/config/i386/linux.h @@ -22,5 +22,3 @@ along with GCC; see the file COPYING3. If not see #define GNU_USER_LINK_EMULATION "elf_i386" #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" - -#define MD_UNWIND_SUPPORT "config/i386/linux-unwind.h" diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h index 99d62496860..9bf7eab04af 100644 --- a/gcc/config/i386/linux64.h +++ b/gcc/config/i386/linux64.h @@ -26,5 +26,3 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" - -#define MD_UNWIND_SUPPORT "config/i386/linux-unwind.h" diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h index 6ae7799359d..c1c12778d70 100644 --- a/gcc/config/i386/mingw32.h +++ b/gcc/config/i386/mingw32.h @@ -241,12 +241,6 @@ __enable_execute_stack (void *addr) \ #include #endif -/* For 64-bit Windows we can't use DW2 unwind info. Also for multilib - builds we can't use it, too. */ -#if !TARGET_64BIT_DEFAULT && !defined (TARGET_BI_ARCH) -#define MD_UNWIND_SUPPORT "config/i386/w32-unwind.h" -#endif - /* This matches SHLIB_SONAME and SHLIB_SOVERSION in t-cygming. */ /* This matches SHLIB_SONAME and SHLIB_SOVERSION in t-cygwin. */ #if DWARF2_UNWIND_INFO diff --git a/gcc/config/i386/sol2.h b/gcc/config/i386/sol2.h index dc5b99e3a85..e466b03d0c9 100644 --- a/gcc/config/i386/sol2.h +++ b/gcc/config/i386/sol2.h @@ -171,5 +171,3 @@ along with GCC; see the file COPYING3. If not see #undef PTRDIFF_TYPE #define PTRDIFF_TYPE "int" - -#define MD_UNWIND_SUPPORT "config/i386/sol2-unwind.h" diff --git a/gcc/config/ia64/linux.h b/gcc/config/ia64/linux.h index e6370ea3492..00b0ddba1a0 100644 --- a/gcc/config/ia64/linux.h +++ b/gcc/config/ia64/linux.h @@ -77,8 +77,6 @@ do { \ #undef LINK_EH_SPEC #define LINK_EH_SPEC "" -#define MD_UNWIND_SUPPORT "config/ia64/linux-unwind.h" - /* Put all *tf routines in libgcc. */ #undef LIBGCC2_HAS_TF_MODE #define LIBGCC2_HAS_TF_MODE 1 diff --git a/gcc/config/ia64/unwind-ia64.c b/gcc/config/ia64/unwind-ia64.c index f935a0ca3e4..061bd4b8980 100644 --- a/gcc/config/ia64/unwind-ia64.c +++ b/gcc/config/ia64/unwind-ia64.c @@ -1,7 +1,7 @@ /* Subroutines needed for unwinding IA-64 standard format stack frame info for exception handling. Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006, - 2009 Free Software Foundation, Inc. + 2009, 2011 Free Software Foundation, Inc. Contributed by Andrew MacLeod Andrew Haley David Mosberger-Tang @@ -1767,9 +1767,7 @@ _Unwind_GetBSP (struct _Unwind_Context *context) return (_Unwind_Ptr) context->bsp; } -#ifdef MD_UNWIND_SUPPORT -#include MD_UNWIND_SUPPORT -#endif +#include "md-unwind-support.h" static _Unwind_Reason_Code uw_frame_state_for (struct _Unwind_Context *context, _Unwind_FrameState *fs) diff --git a/gcc/config/ia64/vms.h b/gcc/config/ia64/vms.h index 777fa34d9a9..5d87e711856 100644 --- a/gcc/config/ia64/vms.h +++ b/gcc/config/ia64/vms.h @@ -185,8 +185,6 @@ typedef struct crtl_name_spec /* Define this to be nonzero if static stack checking is supported. */ #define STACK_CHECK_STATIC_BUILTIN 1 -#define MD_UNWIND_SUPPORT "config/ia64/vms-unwind.h" - #define UNW_IVMS_MODE(HEADER) (((HEADER) >> 44) & 0x3L) #define MD_UNW_COMPATIBLE_PERSONALITY_P(HEADER) (!UNW_IVMS_MODE (HEADER)) diff --git a/gcc/config/m68k/linux.h b/gcc/config/m68k/linux.h index 6c07e261a6c..70738d221bf 100644 --- a/gcc/config/m68k/linux.h +++ b/gcc/config/m68k/linux.h @@ -235,5 +235,3 @@ along with GCC; see the file COPYING3. If not see #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE BITS_PER_WORD - -#define MD_UNWIND_SUPPORT "config/m68k/linux-unwind.h" diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h index aef37bd8f58..544a99f2d0b 100644 --- a/gcc/config/mips/linux.h +++ b/gcc/config/mips/linux.h @@ -99,8 +99,6 @@ along with GCC; see the file COPYING3. If not see %{!shared: \ %{profile:-lc_p} %{!profile:-lc}}" -#define MD_UNWIND_SUPPORT "config/mips/linux-unwind.h" - #ifdef HAVE_AS_NO_SHARED /* Default to -mno-shared for non-PIC. */ # define NO_SHARED_SPECS \ diff --git a/gcc/config/pa/pa-hpux.h b/gcc/config/pa/pa-hpux.h index f167e133eb5..4d91be86dfd 100644 --- a/gcc/config/pa/pa-hpux.h +++ b/gcc/config/pa/pa-hpux.h @@ -1,6 +1,6 @@ /* Definitions of target machine for GNU compiler, for HP-UX. - Copyright (C) 1991, 1995, 1996, 2002, 2003, 2004, 2007, 2008, 2009, 2010 - Free Software Foundation, Inc. + Copyright (C) 1991, 1995, 1996, 2002, 2003, 2004, 2007, 2008, 2009, + 2010, 2011 Free Software Foundation, Inc. This file is part of GCC. @@ -115,5 +115,3 @@ along with GCC; see the file COPYING3. If not see compatibility with the HP-UX unwind library. */ #undef TARGET_HPUX_UNWIND_LIBRARY #define TARGET_HPUX_UNWIND_LIBRARY 1 - -#define MD_UNWIND_SUPPORT "config/pa/hpux-unwind.h" diff --git a/gcc/config/pa/pa32-linux.h b/gcc/config/pa/pa32-linux.h index 8d80a210003..01aa1c4b103 100644 --- a/gcc/config/pa/pa32-linux.h +++ b/gcc/config/pa/pa32-linux.h @@ -1,5 +1,5 @@ /* Definitions for PA_RISC with ELF-32 format - Copyright (C) 2000, 2002, 2004, 2006, 2007, 2010 + Copyright (C) 2000, 2002, 2004, 2006, 2007, 2010, 2011 Free Software Foundation, Inc. This file is part of GCC. @@ -63,5 +63,3 @@ call_ ## FUNC (void) \ #undef WCHAR_TYPE_SIZE #define WCHAR_TYPE_SIZE BITS_PER_WORD - -#define MD_UNWIND_SUPPORT "config/pa/linux-unwind.h" diff --git a/gcc/config/rs6000/darwin.h b/gcc/config/rs6000/darwin.h index b1fe2eb05b5..82971ae0e32 100644 --- a/gcc/config/rs6000/darwin.h +++ b/gcc/config/rs6000/darwin.h @@ -381,10 +381,6 @@ extern int darwin_emit_branch_islands; #include #endif -#if !defined(__LP64__) && !defined(DARWIN_LIBSYSTEM_HAS_UNWIND) -#define MD_UNWIND_SUPPORT "config/rs6000/darwin-unwind.h" -#endif - /* True, iff we're generating fast turn around debugging code. When true, we arrange for function prologues to start with 5 nops so that gdb may insert code to redirect them, and for data to be diff --git a/gcc/config/rs6000/linux.h b/gcc/config/rs6000/linux.h index 305b621e7e2..336727428bc 100644 --- a/gcc/config/rs6000/linux.h +++ b/gcc/config/rs6000/linux.h @@ -113,8 +113,6 @@ #define TARGET_POSIX_IO -#define MD_UNWIND_SUPPORT "config/rs6000/linux-unwind.h" - #ifdef TARGET_LIBC_PROVIDES_SSP /* ppc32 glibc provides __stack_chk_guard in -0x7008(2). */ #define TARGET_THREAD_SSP_OFFSET -0x7008 diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h index 5a26d120a46..972f353061a 100644 --- a/gcc/config/rs6000/linux64.h +++ b/gcc/config/rs6000/linux64.h @@ -539,8 +539,6 @@ extern int dot_symbols; #define USE_LD_AS_NEEDED 1 #endif -#define MD_UNWIND_SUPPORT "config/rs6000/linux-unwind.h" - #ifdef TARGET_LIBC_PROVIDES_SSP /* ppc32 glibc provides __stack_chk_guard in -0x7008(2), ppc64 glibc provides it at -0x7010(13). */ diff --git a/gcc/config/s390/linux.h b/gcc/config/s390/linux.h index 7bd90d9d3ac..e5385eca313 100644 --- a/gcc/config/s390/linux.h +++ b/gcc/config/s390/linux.h @@ -79,8 +79,6 @@ along with GCC; see the file COPYING3. If not see #define TARGET_ASM_FILE_END file_end_indicate_exec_stack -#define MD_UNWIND_SUPPORT "config/s390/linux-unwind.h" - #ifdef TARGET_LIBC_PROVIDES_SSP /* s390 glibc provides __stack_chk_guard in 0x14(tp), s390x glibc provides it at 0x28(tp). */ diff --git a/gcc/config/s390/tpf.h b/gcc/config/s390/tpf.h index c5e86e4a17a..e4a1b50b6ec 100644 --- a/gcc/config/s390/tpf.h +++ b/gcc/config/s390/tpf.h @@ -118,8 +118,6 @@ along with GCC; see the file COPYING3. If not see %{!shared:-shared} \ %(entry_spec)" -#define MD_UNWIND_SUPPORT "config/s390/tpf-unwind.h" - /* IBM copies these libraries over with these names. */ #define MATH_LIBRARY "CLBM" #define LIBSTDCXX "CPP1" diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h index fc954fe9863..edfd99be652 100644 --- a/gcc/config/sh/linux.h +++ b/gcc/config/sh/linux.h @@ -114,8 +114,6 @@ along with GCC; see the file COPYING3. If not see } \ } while (0) -#define MD_UNWIND_SUPPORT "config/sh/linux-unwind.h" - /* For SH3 and SH4, we use a slot of the unwind frame which correspond to a fake register number 16 as a placeholder for the return address in MD_FALLBACK_FRAME_STATE_FOR and its content will be read with diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h index f8e16dd6926..a9b630e6184 100644 --- a/gcc/config/sparc/linux.h +++ b/gcc/config/sparc/linux.h @@ -141,8 +141,6 @@ do { \ /* Static stack checking is supported by means of probes. */ #define STACK_CHECK_STATIC_BUILTIN 1 -#define MD_UNWIND_SUPPORT "config/sparc/linux-unwind.h" - /* Linux currently uses RMO in uniprocessor mode, which is equivalent to TMO, and TMO in multiprocessor mode. But they reserve the right to change their minds. */ diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h index 27ff696f0f2..7f8b37891cf 100644 --- a/gcc/config/sparc/linux64.h +++ b/gcc/config/sparc/linux64.h @@ -261,8 +261,6 @@ do { \ /* Static stack checking is supported by means of probes. */ #define STACK_CHECK_STATIC_BUILTIN 1 -#define MD_UNWIND_SUPPORT "config/sparc/linux-unwind.h" - /* Linux currently uses RMO in uniprocessor mode, which is equivalent to TMO, and TMO in multiprocessor mode. But they reserve the right to change their minds. */ diff --git a/gcc/config/sparc/sol2.h b/gcc/config/sparc/sol2.h index ddc7c4db68a..c99b02f8fe3 100644 --- a/gcc/config/sparc/sol2.h +++ b/gcc/config/sparc/sol2.h @@ -196,5 +196,3 @@ along with GCC; see the file COPYING3. If not see /* Static stack checking is supported by means of probes. */ #define STACK_CHECK_STATIC_BUILTIN 1 - -#define MD_UNWIND_SUPPORT "config/sparc/sol2-unwind.h" diff --git a/gcc/config/xtensa/linux.h b/gcc/config/xtensa/linux.h index d058d16015d..f5caeb7a603 100644 --- a/gcc/config/xtensa/linux.h +++ b/gcc/config/xtensa/linux.h @@ -64,5 +64,3 @@ along with GCC; see the file COPYING3. If not see #undef DBX_REGISTER_NUMBER -#define MD_UNWIND_SUPPORT "config/xtensa/linux-unwind.h" - diff --git a/gcc/config/xtensa/unwind-dw2-xtensa.c b/gcc/config/xtensa/unwind-dw2-xtensa.c index 9544f65ab78..54daf7637ce 100644 --- a/gcc/config/xtensa/unwind-dw2-xtensa.c +++ b/gcc/config/xtensa/unwind-dw2-xtensa.c @@ -1,6 +1,6 @@ /* DWARF2 exception handling and frame unwinding for Xtensa. Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008, 2009 + 2007, 2008, 2009, 2011 Free Software Foundation, Inc. This file is part of GCC. @@ -208,9 +208,7 @@ _Unwind_GetTextRelBase (struct _Unwind_Context *context) return (_Unwind_Ptr) context->bases.tbase; } -#ifdef MD_UNWIND_SUPPORT -#include MD_UNWIND_SUPPORT -#endif +#include "md-unwind-support.h" /* Extract any interesting information from the CIE for the translation unit F belongs to. Return a pointer to the byte after the augmentation, diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index b28a27ed6c9..e248b817695 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -1,5 +1,5 @@ @c Copyright (C) 1988,1989,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001, -@c 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +@c 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 @c Free Software Foundation, Inc. @c This is part of the GCC manual. @c For copying conditions, see the file gcc.texi. @@ -3373,11 +3373,6 @@ of bytes that the format occupies, @var{addr} is the @code{SYMBOL_REF} to be emitted. @end defmac -@defmac MD_UNWIND_SUPPORT -A string specifying a file to be #include'd in unwind-dw2.c. The file -so included typically defines @code{MD_FALLBACK_FRAME_STATE_FOR}. -@end defmac - @defmac MD_FALLBACK_FRAME_STATE_FOR (@var{context}, @var{fs}) This macro allows the target to add CPU and operating system specific code to the call-frame unwinder for use when there is no unwind data diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in index 2b8511d2dec..528ac136616 100644 --- a/gcc/doc/tm.texi.in +++ b/gcc/doc/tm.texi.in @@ -1,5 +1,5 @@ @c Copyright (C) 1988,1989,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001, -@c 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 +@c 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 @c Free Software Foundation, Inc. @c This is part of the GCC manual. @c For copying conditions, see the file gcc.texi. @@ -3361,11 +3361,6 @@ of bytes that the format occupies, @var{addr} is the @code{SYMBOL_REF} to be emitted. @end defmac -@defmac MD_UNWIND_SUPPORT -A string specifying a file to be #include'd in unwind-dw2.c. The file -so included typically defines @code{MD_FALLBACK_FRAME_STATE_FOR}. -@end defmac - @defmac MD_FALLBACK_FRAME_STATE_FOR (@var{context}, @var{fs}) This macro allows the target to add CPU and operating system specific code to the call-frame unwinder for use when there is no unwind data diff --git a/gcc/system.h b/gcc/system.h index e39a6f928e9..d08166135fa 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -763,7 +763,8 @@ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN; /* Target macros only used for code built for the target, that have moved to libgcc-tm.h or have never been present elsewhere. */ - #pragma GCC poison DECLARE_LIBRARY_RENAMES LIBGCC2_GNU_PREFIX + #pragma GCC poison DECLARE_LIBRARY_RENAMES LIBGCC2_GNU_PREFIX \ + MD_UNWIND_SUPPORT /* Other obsolete target macros, or macros that used to be in target headers and were not used, and may be obsolete or may never have diff --git a/gcc/unwind-dw2.c b/gcc/unwind-dw2.c index 25990b4e73b..19da29982b6 100644 --- a/gcc/unwind-dw2.c +++ b/gcc/unwind-dw2.c @@ -333,9 +333,7 @@ _Unwind_GetTextRelBase (struct _Unwind_Context *context) } #endif -#ifdef MD_UNWIND_SUPPORT -#include MD_UNWIND_SUPPORT -#endif +#include "md-unwind-support.h" /* Extract any interesting information from the CIE for the translation unit F belongs to. Return a pointer to the byte after the augmentation, diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 4141890af33..5a4fec5139d 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,48 @@ +2011-06-03 Rainer Orth + + * config/alpha/linux-unwind.h: Move from ../gcc/config/alpha. + * config/alpha/osf5-unwind.h: Move from ../gcc/config/alpha. + * config/alpha/vms-unwind.h: Move from ../gcc/config/alpha. + * config/bfin/linux-unwind.h: Move from ../gcc/config/bfin. + * config/i386/linux-unwind.h: Move from ../gcc/config/i386. + * config/i386/sol2-unwind.h: Move from ../gcc/config/i386. + * config/i386/w32-unwind.h: Move from ../gcc/config/i386. + Wrap in !__MINGW64__. + * config/ia64/linux-unwind.h: Move from ../gcc/config/ia64. + * config/ia64/vms-unwind.h: Move from ../gcc/config/ia64. + * config/m68k/linux-unwind.h: Move from ../gcc/config/m68k. + * config/mips/linux-unwind.h: Move from ../gcc/config/mips. + * config/pa/hpux-unwind.h: Move from ../gcc/config/pa. + * config/pa/linux-unwind.h: Move from ../gcc/config/pa. + * config/rs6000/darwin-unwind.h: Move from ../gcc/config/rs6000. + Wrap in !__LP64__. + * config/rs6000/linux-unwind.h: Move from ../gcc/config/rs6000. + * config/s390/linux-unwind.h: Move from ../gcc/config/s390. + * config/s390/tpf-unwind.h: Move from ../gcc/config/s390. + * config/sh/linux-unwind.h: Move from ../gcc/config/sh. + * config/sparc/linux-unwind.h: Move from ../gcc/config/sparc. + * config/sparc/sol2-unwind.h: Move from ../gcc/config/sparc. + * config/xtensa/linux-unwind.h: Move from ../gcc/config/xtensa. + * config/no-unwind.h: New file. + * config.host (md_unwind_header): Document. + Define. + (alpha*-*-linux*, alpha*-dec-osf5.1*, alpha64-dec-*vms*, + alpha*-dec-*vms*, bfin*-uclinux*, bfin*-linux-uclibc*, + hppa*-*-linux*, hppa[12]*-*-hpux10*, hppa*64*-*-hpux11*, + hppa[12]*-*-hpux11*): Set md_unwind_header. + (i[34567]86-*-linux*): Handle i[34567]86-*-kopensolaris*-gnu. + Set md_unwind_header. + (x86_64-*-linux*, i[34567]86-*-solaris2*): Set md_unwind_header. + (i[34567]86-*-cygwin*): Split from i[34567]86-*-mingw*. + (i[34567]86-*-mingw*, ia64*-*-linux*, ia64-hp-*vms*, + m68k-*-uclinux*, m68k-*-linux*, mips64*-*-linux*, mips*-*-linux*, + powerpc-*-darwin*, powerpc-*-linux*, s390-*-linux*, + s390x-*-linux*, s390x-ibm-tpf*, sh*-*-linux*, sparc-*-linux*, + sparc*-*-solaris2*, sparc64-*-linux*, xtensa*-*-linux*): Set + md_unwind_header. + * configure.ac: Link md-unwind-support.h to $md_unwind_header. + * configure: Regenerate. + 2011-06-03 Rainer Orth * config.host (mips-sgi-irix[56]*): Restrict to mips-sgi-irix6.5*. diff --git a/libgcc/config.host b/libgcc/config.host index fa16613835a..c44ddd7b09a 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -50,6 +50,8 @@ # If either is set, EXTRA_PARTS and # EXTRA_MULTILIB_PARTS inherited from the GCC # subdirectory will be ignored. +# md_unwind_header The name of a header file defining +# MD_FALLBACK_FRAME_STATE_FOR. # tmake_file A list of machine-description-specific # makefile-fragments, if different from # "$cpu_type/t-$cpu_type". @@ -57,6 +59,7 @@ asm_hidden_op=.hidden extra_parts= tmake_file= +md_unwind_header=no-unwind.h # Set default cpu_type so it can be updated in each machine entry. cpu_type=`echo ${host} | sed 's/-.*$//'` @@ -210,6 +213,7 @@ case ${host} in alpha*-*-linux*) tmake_file="${tmake_file} alpha/t-crtfm" extra_parts="$extra_parts crtfastmath.o" + md_unwind_header=alpha/linux-unwind.h ;; alpha*-*-freebsd*) ;; @@ -225,12 +229,15 @@ alpha*-dec-osf5.1*) ;; esac extra_parts="${extra_parts} qrnnd.o crtfastmath.o gthr-posix.o" + md_unwind_header=alpha/osf5-unwind.h ;; alpha64-dec-*vms*) tmake_file="vms/t-vms vms/t-vms64 alpha/t-vms" + md_unwind_header=alpha/vms-unwind.h ;; alpha*-dec-*vms*) tmake_file="vms/t-vms alpha/t-vms" + md_unwind_header=alpha/vms-unwind.h ;; arm-wrs-vxworks) ;; @@ -261,11 +268,13 @@ avr-*-*) bfin*-elf*) ;; bfin*-uclinux*) + md_unwind_header=bfin/linux-unwind.h ;; bfin*-linux-uclibc*) # No need to build crtbeginT.o on uClibc systems. Should probably # be moved to the OS specific section above. extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" + md_unwind_header=bfin/linux-unwind.h ;; bfin*-*) ;; @@ -289,12 +298,16 @@ h8300-*-elf*) hppa*64*-*-linux*) ;; hppa*-*-linux*) + md_unwind_header=pa/pa32-linux.h ;; hppa[12]*-*-hpux10*) + md_unwind_header=pa/hpux-unwind.h ;; hppa*64*-*-hpux11*) + md_unwind_header=pa/hpux-unwind.h ;; hppa[12]*-*-hpux11*) + md_unwind_header=pa/hpux-unwind.h ;; i[34567]86-*-darwin*) ;; @@ -319,13 +332,15 @@ i[34567]86-*-openbsd2.*|i[34567]86-*openbsd3.[0123]) ;; i[34567]86-*-openbsd*) ;; -i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu*) +i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu) extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o" tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm" + md_unwind_header=i386/linux-unwind.h ;; x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu) extra_parts="$extra_parts crtprec32.o crtprec64.o crtprec80.o crtfastmath.o" tmake_file="${tmake_file} i386/t-crtpc i386/t-crtfm" + md_unwind_header=i386/linux-unwind.h ;; i[34567]86-pc-msdosdjgpp*) ;; @@ -347,13 +362,19 @@ i[34567]86-*-rtems*) i[34567]86-*-solaris2*) tmake_file="$tmake_file i386/t-crtfm" extra_parts="$extra_parts crtfastmath.o" + md_unwind_header=i386/sol2-unwind.h ;; i[4567]86-wrs-vxworks|i[4567]86-wrs-vxworksae) ;; -i[34567]86-*-cygwin* | i[34567]86-*-mingw*) +i[34567]86-*-cygwin*) extra_parts="crtbegin.o crtend.o crtfastmath.o" tmake_file="i386/t-cygming i386/t-crtfm" ;; +i[34567]86-*-mingw*) + extra_parts="crtbegin.o crtend.o crtfastmath.o" + tmake_file="i386/t-cygming i386/t-crtfm" + md_unwind_header=i386/w32-unwind.h + ;; x86_64-*-mingw*) ;; i[34567]86-*-interix3*) @@ -369,11 +390,13 @@ ia64*-*-freebsd*) ia64*-*-linux*) extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o" tmake_file="ia64/t-ia64 t-softfp ia64/t-fprules-softfp ia64/t-softfp-compat" + md_unwind_header=ia64/linux-unwind.h ;; ia64*-*-hpux*) ;; ia64-hp-*vms*) tmake_file="vms/t-vms vms/t-vms64 ia64/t-vms" + md_unwind_header=ia64/vms-unwind.h ;; iq2000*-*-elf*) ;; @@ -400,10 +423,12 @@ m68k*-*-netbsdelf*) m68k*-*-openbsd*) ;; m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux with uClibc + md_unwind_header=m68k/linux-unwind.h ;; -m68k-*-linux*) # Motorola m68k's running GNU/Linux +m68k-*-linux*) # Motorola m68k's running GNU/Linux # with ELF format using glibc 2 # aka the GNU/Linux C library 6. + md_unwind_header=m68k/linux-unwind.h ;; m68k-*-rtems*) ;; @@ -421,10 +446,12 @@ mips*-*-netbsd*) # NetBSD/mips, either endian. mips64*-*-linux*) extra_parts="$extra_parts crtfastmath.o" tmake_file="{$tmake_file} mips/t-crtfm" + md_unwind_header=mips/linux-unwind.h ;; mips*-*-linux*) # Linux MIPS, either endian. extra_parts="$extra_parts crtfastmath.o" tmake_file="{$tmake_file} mips/t-crtfm" + md_unwind_header=mips/linux-unwind.h ;; mips*-*-openbsd*) ;; @@ -469,6 +496,15 @@ pdp11-*-*) picochip-*-*) ;; powerpc-*-darwin*) + case ${host} in + *-*-darwin9* | *-*-darwin[12][0-9]*) + # libSystem contains unwind information for signal frames since + # Darwin 9. + ;; + *) + md_unwind_header=rs6000/darwin-unwind.h + ;; + esac ;; powerpc64-*-darwin*) ;; @@ -495,6 +531,7 @@ powerpc-*-rtems*) ;; powerpc-*-linux* | powerpc64-*-linux*) tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-ldbl128 t-softfp" + md_unwind_header=rs6000/linux-unwind.h ;; powerpc-wrs-vxworks|powerpc-wrs-vxworksae) ;; @@ -518,12 +555,15 @@ rx-*-elf) ;; s390-*-linux*) tmake_file="${tmake_file} s390/t-crtstuff s390/t-linux s390/32/t-floattodi" + md_unwind_header=s390/linux-unwind.h ;; s390x-*-linux*) tmake_file="${tmake_file} s390/t-crtstuff s390/t-linux" + md_unwind_header=s390/linux-unwind.h ;; s390x-ibm-tpf*) tmake_file="${tmake_file} s390/t-crtstuff s390/t-tpf" + md_unwind_header-s390/tpf-unwind.h ;; score-*-elf) ;; @@ -534,6 +574,7 @@ sh-*-elf* | sh[12346l]*-*-elf* | \ case ${host} in sh*-*-linux*) tmake_file="${tmake_file} sh/t-linux" + md_unwind_header=sh/unwind-linux.h ;; esac ;; @@ -559,6 +600,7 @@ sparc-*-elf*) sparc-*-linux*) # SPARC's running GNU/Linux, libc6 extra_parts="$extra_parts crtfastmath.o" tmake_file="${tmake_file} t-crtfm" + md_unwind_header=sparc/linux.h ;; sparc-*-rtems* | sparc64-*-rtems* ) tmake_file="sparc/t-elf t-crtin t-crtfm t-rtems" @@ -567,6 +609,7 @@ sparc-*-rtems* | sparc64-*-rtems* ) sparc*-*-solaris2*) tmake_file="$tmake_file t-crtfm" extra_parts="$extra_parts crtfastmath.o" + md_unwind_header=sparc/sol2-unwind.h ;; sparc64-*-elf*) tmake_file="${tmake_file} t-crtin t-crtfm" @@ -579,6 +622,7 @@ sparc64-*-freebsd*|ultrasparc-*-freebsd*) sparc64-*-linux*) # 64-bit SPARC's running GNU/Linux extra_parts="$extra_parts crtfastmath.o" tmake_file="${tmake_file} t-crtfm" + md_unwind_header=sparc/linux-unwind.h ;; sparc64-*-netbsd*) ;; @@ -601,6 +645,7 @@ xstormy16-*-elf) xtensa*-*-elf*) ;; xtensa*-*-linux*) + md_unwind_header=xtensa/linux-unwind.h ;; am33_2.0-*-linux*) extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o" diff --git a/gcc/config/alpha/linux-unwind.h b/libgcc/config/alpha/linux-unwind.h similarity index 100% rename from gcc/config/alpha/linux-unwind.h rename to libgcc/config/alpha/linux-unwind.h diff --git a/gcc/config/alpha/osf5-unwind.h b/libgcc/config/alpha/osf5-unwind.h similarity index 100% rename from gcc/config/alpha/osf5-unwind.h rename to libgcc/config/alpha/osf5-unwind.h diff --git a/gcc/config/alpha/vms-unwind.h b/libgcc/config/alpha/vms-unwind.h similarity index 100% rename from gcc/config/alpha/vms-unwind.h rename to libgcc/config/alpha/vms-unwind.h diff --git a/gcc/config/bfin/linux-unwind.h b/libgcc/config/bfin/linux-unwind.h similarity index 100% rename from gcc/config/bfin/linux-unwind.h rename to libgcc/config/bfin/linux-unwind.h diff --git a/gcc/config/i386/linux-unwind.h b/libgcc/config/i386/linux-unwind.h similarity index 100% rename from gcc/config/i386/linux-unwind.h rename to libgcc/config/i386/linux-unwind.h diff --git a/gcc/config/i386/sol2-unwind.h b/libgcc/config/i386/sol2-unwind.h similarity index 100% rename from gcc/config/i386/sol2-unwind.h rename to libgcc/config/i386/sol2-unwind.h diff --git a/gcc/config/i386/w32-unwind.h b/libgcc/config/i386/w32-unwind.h similarity index 98% rename from gcc/config/i386/w32-unwind.h rename to libgcc/config/i386/w32-unwind.h index 449e9a9c5d6..d77b8e3bd9a 100644 --- a/gcc/config/i386/w32-unwind.h +++ b/libgcc/config/i386/w32-unwind.h @@ -1,5 +1,5 @@ /* Definitions for Dwarf2 EH unwind support for Windows32 targets - Copyright (C) 2007, 2009, 2010 + Copyright (C) 2007, 2009, 2010, 2011 Free Software Foundation, Inc. Contributed by Pascal Obry @@ -82,6 +82,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see Note that this implementation follows closely the same principles as the GNU/Linux and OSF ones. */ +#ifndef __MINGW64__ + #define WIN32_MEAN_AND_LEAN #include /* Patterns found experimentally to be on a Windows signal handler */ @@ -202,3 +204,5 @@ i386_w32_fallback_frame_state (struct _Unwind_Context *context, else return _URC_END_OF_STACK; } + +#endif /* !__MINGW64__ */ diff --git a/gcc/config/ia64/linux-unwind.h b/libgcc/config/ia64/linux-unwind.h similarity index 100% rename from gcc/config/ia64/linux-unwind.h rename to libgcc/config/ia64/linux-unwind.h diff --git a/gcc/config/ia64/vms-unwind.h b/libgcc/config/ia64/vms-unwind.h similarity index 100% rename from gcc/config/ia64/vms-unwind.h rename to libgcc/config/ia64/vms-unwind.h diff --git a/gcc/config/m68k/linux-unwind.h b/libgcc/config/m68k/linux-unwind.h similarity index 100% rename from gcc/config/m68k/linux-unwind.h rename to libgcc/config/m68k/linux-unwind.h diff --git a/gcc/config/mips/linux-unwind.h b/libgcc/config/mips/linux-unwind.h similarity index 100% rename from gcc/config/mips/linux-unwind.h rename to libgcc/config/mips/linux-unwind.h diff --git a/libgcc/config/no-unwind.h b/libgcc/config/no-unwind.h new file mode 100644 index 00000000000..0ecd78a60de --- /dev/null +++ b/libgcc/config/no-unwind.h @@ -0,0 +1,2 @@ +/* Dummy header for targets without a definition of + MD_FALLBACK_FRAME_STATE_FOR. */ diff --git a/gcc/config/pa/hpux-unwind.h b/libgcc/config/pa/hpux-unwind.h similarity index 100% rename from gcc/config/pa/hpux-unwind.h rename to libgcc/config/pa/hpux-unwind.h diff --git a/gcc/config/pa/linux-unwind.h b/libgcc/config/pa/linux-unwind.h similarity index 100% rename from gcc/config/pa/linux-unwind.h rename to libgcc/config/pa/linux-unwind.h diff --git a/gcc/config/rs6000/darwin-unwind.h b/libgcc/config/rs6000/darwin-unwind.h similarity index 88% rename from gcc/config/rs6000/darwin-unwind.h rename to libgcc/config/rs6000/darwin-unwind.h index 9fdc115be5a..8a4fbd55ac1 100644 --- a/gcc/config/rs6000/darwin-unwind.h +++ b/libgcc/config/rs6000/darwin-unwind.h @@ -1,5 +1,5 @@ -/* DWARF2 EH unwinding support for Darwin. - Copyright (C) 2004, 2009 Free Software Foundation, Inc. +/* DWARF2 EH unwinding support for 32-bit PowerPC Darwin. + Copyright (C) 2004, 2009, 2011 Free Software Foundation, Inc. This file is part of GCC. @@ -22,9 +22,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ +#ifndef __LP64__ + extern bool _Unwind_fallback_frame_state_for (struct _Unwind_Context *context, _Unwind_FrameState *fs); #define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS) \ (_Unwind_fallback_frame_state_for (CONTEXT, FS) \ ? _URC_NO_REASON : _URC_END_OF_STACK) + +#endif diff --git a/gcc/config/rs6000/linux-unwind.h b/libgcc/config/rs6000/linux-unwind.h similarity index 100% rename from gcc/config/rs6000/linux-unwind.h rename to libgcc/config/rs6000/linux-unwind.h diff --git a/gcc/config/s390/linux-unwind.h b/libgcc/config/s390/linux-unwind.h similarity index 100% rename from gcc/config/s390/linux-unwind.h rename to libgcc/config/s390/linux-unwind.h diff --git a/gcc/config/s390/tpf-unwind.h b/libgcc/config/s390/tpf-unwind.h similarity index 100% rename from gcc/config/s390/tpf-unwind.h rename to libgcc/config/s390/tpf-unwind.h diff --git a/gcc/config/sh/linux-unwind.h b/libgcc/config/sh/linux-unwind.h similarity index 100% rename from gcc/config/sh/linux-unwind.h rename to libgcc/config/sh/linux-unwind.h diff --git a/gcc/config/sparc/linux-unwind.h b/libgcc/config/sparc/linux-unwind.h similarity index 100% rename from gcc/config/sparc/linux-unwind.h rename to libgcc/config/sparc/linux-unwind.h diff --git a/gcc/config/sparc/sol2-unwind.h b/libgcc/config/sparc/sol2-unwind.h similarity index 100% rename from gcc/config/sparc/sol2-unwind.h rename to libgcc/config/sparc/sol2-unwind.h diff --git a/gcc/config/xtensa/linux-unwind.h b/libgcc/config/xtensa/linux-unwind.h similarity index 100% rename from gcc/config/xtensa/linux-unwind.h rename to libgcc/config/xtensa/linux-unwind.h diff --git a/libgcc/configure b/libgcc/configure index 8232725f372..1a3a0bde258 100644 --- a/libgcc/configure +++ b/libgcc/configure @@ -3962,6 +3962,8 @@ tmake_file="${tmake_file_}" +ac_config_links="$ac_config_links md-unwind-support.h:config/$md_unwind_header" + # We need multilib support. ac_config_files="$ac_config_files Makefile" @@ -4532,6 +4534,7 @@ esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" +config_links="$ac_config_links" config_commands="$ac_config_commands" _ACEOF @@ -4556,6 +4559,9 @@ Usage: $0 [OPTION]... [TAG]... Configuration files: $config_files +Configuration links: +$config_links + Configuration commands: $config_commands @@ -4683,6 +4689,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 for ac_config_target in $ac_config_targets do case $ac_config_target in + "md-unwind-support.h") CONFIG_LINKS="$CONFIG_LINKS md-unwind-support.h:config/$md_unwind_header" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; @@ -4697,6 +4704,7 @@ done # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi @@ -4876,7 +4884,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" -eval set X " :F $CONFIG_FILES :C $CONFIG_COMMANDS" +eval set X " :F $CONFIG_FILES :L $CONFIG_LINKS :C $CONFIG_COMMANDS" shift for ac_tag do @@ -5089,7 +5097,38 @@ which seems to be undefined. Please make sure it is defined." >&2;} || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + :L) + # + # CONFIG_LINK + # + + if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then + : + else + # Prefer the file from the source tree if names are identical. + if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then + ac_source=$srcdir/$ac_source + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 +$as_echo "$as_me: linking $ac_source to $ac_file" >&6;} + + if test ! -r "$ac_source"; then + as_fn_error "$ac_source: file not found" "$LINENO" 5 + fi + rm -f "$ac_file" + + # Try a relative symlink, then a hard link, then a copy. + case $srcdir in + [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; + *) ac_rel_source=$ac_top_build_prefix$ac_source ;; + esac + ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || + ln "$ac_source" "$ac_file" 2>/dev/null || + cp -p "$ac_source" "$ac_file" || + as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 + fi + ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; diff --git a/libgcc/configure.ac b/libgcc/configure.ac index 75f3967b0c3..f2bcabf4872 100644 --- a/libgcc/configure.ac +++ b/libgcc/configure.ac @@ -278,6 +278,7 @@ AC_SUBST(tmake_file) AC_SUBST(cpu_type) AC_SUBST(extra_parts) AC_SUBST(asm_hidden_op) +AC_CONFIG_LINKS([md-unwind-support.h:config/$md_unwind_header]) # We need multilib support. AC_CONFIG_FILES([Makefile]) -- 2.30.2