• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/gcc/6.3.0/894-libgcc-fix-DWARF-compilation-with-FDPIC-targets.patch
Gustavo ZacariasGustavo Zacarias committed be1a3a3e46121 Dec 2016
Raw file
Source viewDiff to previous
 
1
From 9d9f97ca5d1ceba66677bf406c9b31027dc1f22e Mon Sep 17 00:00:00 2001
2
From: Waldemar Brodkorb <wbx@openadk.org>
3
Date: Fri, 19 Aug 2016 13:54:46 +0200
4
Subject: [PATCH] libgcc: fix DWARF compilation with FDPIC targets
5
​
6
The build of unwind-dw2-fde-dip.c currently fails for FDPIC targets with
7
the following error:
8
​
9
libgcc/unwind-dw2-fde-dip.c:167:31: error: storage size of 'load_base' isn't known
10
   struct elf32_fdpic_loadaddr load_base;
11
​
12
This patch addresses that by defining load_base with the appropriate
13
type on FDPIC targets. It has been tested on FRV and Blackfin.
14
​
15
Fixes PR gcc/68468.
16
​
17
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
18
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
19
---
20
 libgcc/unwind-dw2-fde-dip.c | 8 ++++++--
21
 1 file changed, 6 insertions(+), 2 deletions(-)
22
​
23
diff --git a/libgcc/unwind-dw2-fde-dip.c b/libgcc/unwind-dw2-fde-dip.c
24
index f7a1c3f..801bce8 100644
25
--- a/libgcc/unwind-dw2-fde-dip.c
26
+++ b/libgcc/unwind-dw2-fde-dip.c
27
@@ -124,7 +124,11 @@ static struct frame_hdr_cache_element
28
 {
29
   _Unwind_Ptr pc_low;
30
   _Unwind_Ptr pc_high;
31
+#if defined __FRV_FDPIC__ || defined __BFIN_FDPIC__
32
+  struct elf32_fdpic_loadaddr load_base;
33
+#else
34
   _Unwind_Ptr load_base;
35
+#endif
36
   const ElfW(Phdr) *p_eh_frame_hdr;
37
   const ElfW(Phdr) *p_dynamic;
38
   struct frame_hdr_cache_element *link;
39
@@ -163,7 +167,7 @@ _Unwind_IteratePhdrCallback (struct dl_phdr_info *info, size_t size, void *ptr)
40
   struct unw_eh_callback_data *data = (struct unw_eh_callback_data *) ptr;
41
   const ElfW(Phdr) *phdr, *p_eh_frame_hdr, *p_dynamic;
42
   long n, match;
43
-#ifdef __FRV_FDPIC__
44
+#if defined __FRV_FDPIC__ || defined __BFIN_FDPIC__
45
   struct elf32_fdpic_loadaddr load_base;
46
 #else
47
   _Unwind_Ptr load_base;
48
@@ -347,7 +351,7 @@ _Unwind_IteratePhdrCallback (struct dl_phdr_info *info, size_t size, void *ptr)
49
        break;
50
      }
51
     }
52
-# elif defined __FRV_FDPIC__ && defined __linux__
53
+# elif (defined __FRV_FDPIC__ || defined __BFIN_FDPIC__) && defined __linux__
54
   data->dbase = load_base.got_value;
55
 # else
56
 #  error What is DW_EH_PE_datarel base on this platform?
57
-- 
58
2.7.4
59
​
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.