arm.patch

From: Christian Prochaska <christian.prochaska@genode-labs.com>


---
 gcc/config/arm/arm.h           |    7 ++-----
 libgcc/config/arm/unwind-arm.h |    2 +-
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 72503dcab..e5f23add3 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -945,7 +945,7 @@ extern const int arm_arch_cde_coproc_bits[];
 #define EH_RETURN_STACKADJ_RTX	gen_rtx_REG (SImode, ARM_EH_STACKADJ_REGNUM)
 
 #ifndef ARM_TARGET2_DWARF_FORMAT
-#define ARM_TARGET2_DWARF_FORMAT DW_EH_PE_pcrel
+#define ARM_TARGET2_DWARF_FORMAT (DW_EH_PE_pcrel | DW_EH_PE_indirect)
 #endif
 
 /* ttype entries (the only interesting data references used)
@@ -2343,10 +2343,7 @@ extern const char *arm_target_thumb_only (int argc, const char **argv);
 /* -mcpu=native handling only makes sense with compiler running on
    an ARM chip.  */
 #if defined(__arm__)
-extern const char *host_detect_local_cpu (int argc, const char **argv);
-#define HAVE_LOCAL_CPU_DETECT
-# define MCPU_MTUNE_NATIVE_FUNCTIONS			\
-  { "local_cpu_detect", host_detect_local_cpu },
+# define MCPU_MTUNE_NATIVE_FUNCTIONS
 # define MCPU_MTUNE_NATIVE_SPECS				\
    " %{march=native:%<march=native %:local_cpu_detect(arch)}"	\
    " %{mcpu=native:%<mcpu=native %:local_cpu_detect(cpu)}"	\
diff --git a/libgcc/config/arm/unwind-arm.h b/libgcc/config/arm/unwind-arm.h
index e77b769d7..52d4a6448 100644
--- a/libgcc/config/arm/unwind-arm.h
+++ b/libgcc/config/arm/unwind-arm.h
@@ -74,7 +74,7 @@ static inline _Unwind_Ptr _Unwind_gnu_Find_got (_Unwind_Ptr ptr)
       tmp += _Unwind_gnu_Find_got (ptr);
       tmp = *(_Unwind_Word *) tmp;
 #elif (defined(linux) && !defined(__uClinux__)) || defined(__NetBSD__) \
-    || defined(__FreeBSD__) || defined(__fuchsia__)
+    || defined(__FreeBSD__) || defined(__fuchsia__) || 1
       /* Pc-relative indirect.  */
 #define _GLIBCXX_OVERRIDE_TTYPE_ENCODING (DW_EH_PE_pcrel | DW_EH_PE_indirect)
       tmp += ptr;
