summaryrefslogtreecommitdiff
path: root/packages/gcc-linaro/6.4-2018.05/0012-libgcc-fix-DWARF-compilation-with-FDPIC-targets.patch
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2018-09-26 04:47:03 (GMT)
committerGitHub <noreply@github.com>2018-09-26 04:47:03 (GMT)
commit49520dbf6d55640974f89becae00fe142f5b9c21 (patch)
tree7c114a60de71b641443f219c28ddbb1bf2b32fa5 /packages/gcc-linaro/6.4-2018.05/0012-libgcc-fix-DWARF-compilation-with-FDPIC-targets.patch
parenteb65ba65ba761f2ff613342498fd58fcefdc606e (diff)
parent581e8a514bf7e7c3fb7df219dca55fae5de044c0 (diff)
Merge pull request #1032 from stilor/updates
Update packages
Diffstat (limited to 'packages/gcc-linaro/6.4-2018.05/0012-libgcc-fix-DWARF-compilation-with-FDPIC-targets.patch')
-rw-r--r--packages/gcc-linaro/6.4-2018.05/0012-libgcc-fix-DWARF-compilation-with-FDPIC-targets.patch54
1 files changed, 54 insertions, 0 deletions
diff --git a/packages/gcc-linaro/6.4-2018.05/0012-libgcc-fix-DWARF-compilation-with-FDPIC-targets.patch b/packages/gcc-linaro/6.4-2018.05/0012-libgcc-fix-DWARF-compilation-with-FDPIC-targets.patch
new file mode 100644
index 0000000..f0ada67
--- /dev/null
+++ b/packages/gcc-linaro/6.4-2018.05/0012-libgcc-fix-DWARF-compilation-with-FDPIC-targets.patch
@@ -0,0 +1,54 @@
+From 9d9f97ca5d1ceba66677bf406c9b31027dc1f22e Mon Sep 17 00:00:00 2001
+From: Waldemar Brodkorb <wbx@openadk.org>
+Date: Fri, 19 Aug 2016 13:54:46 +0200
+Subject: [PATCH] libgcc: fix DWARF compilation with FDPIC targets
+
+The build of unwind-dw2-fde-dip.c currently fails for FDPIC targets with
+the following error:
+
+libgcc/unwind-dw2-fde-dip.c:167:31: error: storage size of 'load_base' isn't known
+ struct elf32_fdpic_loadaddr load_base;
+
+This patch addresses that by defining load_base with the appropriate
+type on FDPIC targets. It has been tested on FRV and Blackfin.
+
+Fixes PR gcc/68468.
+
+Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ libgcc/unwind-dw2-fde-dip.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+--- a/libgcc/unwind-dw2-fde-dip.c
++++ b/libgcc/unwind-dw2-fde-dip.c
+@@ -124,7 +124,11 @@
+ {
+ _Unwind_Ptr pc_low;
+ _Unwind_Ptr pc_high;
++#if defined __FRV_FDPIC__ || defined __BFIN_FDPIC__
++ struct elf32_fdpic_loadaddr load_base;
++#else
+ _Unwind_Ptr load_base;
++#endif
+ const ElfW(Phdr) *p_eh_frame_hdr;
+ const ElfW(Phdr) *p_dynamic;
+ struct frame_hdr_cache_element *link;
+@@ -163,7 +167,7 @@
+ struct unw_eh_callback_data *data = (struct unw_eh_callback_data *) ptr;
+ const ElfW(Phdr) *phdr, *p_eh_frame_hdr, *p_dynamic;
+ long n, match;
+-#ifdef __FRV_FDPIC__
++#if defined __FRV_FDPIC__ || defined __BFIN_FDPIC__
+ struct elf32_fdpic_loadaddr load_base;
+ #else
+ _Unwind_Ptr load_base;
+@@ -347,7 +351,7 @@
+ break;
+ }
+ }
+-# elif defined __FRV_FDPIC__ && defined __linux__
++# elif (defined __FRV_FDPIC__ || defined __BFIN_FDPIC__) && defined __linux__
+ data->dbase = load_base.got_value;
+ # else
+ # error What is DW_EH_PE_datarel base on this platform?