summaryrefslogtreecommitdiff
path: root/toolchain/gcc
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2017-07-11 19:06:43 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2017-07-12 19:30:36 +0200
commit106fbf668233ebc8583216af9179a354597e80d9 (patch)
treed616b401d55f53c9d3edcdf9866ff3f746f1b002 /toolchain/gcc
parentd032a6289a88beaf8f764564e0fd796c3edb2904 (diff)
sh: fix uClibc-ng fdpic toolchain compile
Diffstat (limited to 'toolchain/gcc')
-rw-r--r--toolchain/gcc/patches/6.3.0/fix-dwarf-fdpic.uclibc-ng33
1 files changed, 33 insertions, 0 deletions
diff --git a/toolchain/gcc/patches/6.3.0/fix-dwarf-fdpic.uclibc-ng b/toolchain/gcc/patches/6.3.0/fix-dwarf-fdpic.uclibc-ng
new file mode 100644
index 000000000..d462a6c7a
--- /dev/null
+++ b/toolchain/gcc/patches/6.3.0/fix-dwarf-fdpic.uclibc-ng
@@ -0,0 +1,33 @@
+diff -Nur gcc-6.3.0.orig/libgcc/unwind-dw2-fde-dip.c gcc-6.3.0/libgcc/unwind-dw2-fde-dip.c
+--- gcc-6.3.0.orig/libgcc/unwind-dw2-fde-dip.c 2016-01-04 15:30:50.000000000 +0100
++++ gcc-6.3.0/libgcc/unwind-dw2-fde-dip.c 2017-05-18 00:43:58.000000000 +0200
+@@ -124,7 +124,11 @@
+ {
+ _Unwind_Ptr pc_low;
+ _Unwind_Ptr pc_high;
++#if defined __FRV_FDPIC__ || defined __BFIN_FDPIC__ || defined __SH_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__ || defined __SH_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 __SH_FDPIC__ && defined __linux__
+ data->dbase = load_base.got_value;
+ # else
+ # error What is DW_EH_PE_datarel base on this platform?