diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-6.4/0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-6.4/0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-6.4/0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch b/meta/recipes-devtools/gcc/gcc-6.4/0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch deleted file mode 100644 index 5d41af44a4..0000000000 --- a/meta/recipes-devtools/gcc/gcc-6.4/0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | From 6ab23e88aef22bbabee7b9600c459ff39547bb66 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Thu, 24 Mar 2016 11:23:14 -0400 | ||
4 | Subject: [PATCH 44/46] gcc/final.c: -fdebug-prefix-map support to remap | ||
5 | sources with relative path | ||
6 | |||
7 | PR other/70428 | ||
8 | * final.c (remap_debug_filename): Use lrealpath to translate | ||
9 | relative path before remapping | ||
10 | |||
11 | https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70428 | ||
12 | Upstream-Status: Submitted [gcc-patches@gcc.gnu.org] | ||
13 | |||
14 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
15 | --- | ||
16 | gcc/final.c | 15 ++++++++++++--- | ||
17 | 1 file changed, 12 insertions(+), 3 deletions(-) | ||
18 | |||
19 | diff --git a/gcc/final.c b/gcc/final.c | ||
20 | index 55cf509..23293e5 100644 | ||
21 | --- a/gcc/final.c | ||
22 | +++ b/gcc/final.c | ||
23 | @@ -1554,16 +1554,25 @@ remap_debug_filename (const char *filename) | ||
24 | const char *name; | ||
25 | size_t name_len; | ||
26 | |||
27 | + /* Support to remap filename with relative path */ | ||
28 | + char *realpath = lrealpath (filename); | ||
29 | + if (realpath == NULL) | ||
30 | + return filename; | ||
31 | + | ||
32 | for (map = debug_prefix_maps; map; map = map->next) | ||
33 | - if (filename_ncmp (filename, map->old_prefix, map->old_len) == 0) | ||
34 | + if (filename_ncmp (realpath, map->old_prefix, map->old_len) == 0) | ||
35 | break; | ||
36 | if (!map) | ||
37 | - return filename; | ||
38 | - name = filename + map->old_len; | ||
39 | + { | ||
40 | + free (realpath); | ||
41 | + return filename; | ||
42 | + } | ||
43 | + name = realpath + map->old_len; | ||
44 | name_len = strlen (name) + 1; | ||
45 | s = (char *) alloca (name_len + map->new_len); | ||
46 | memcpy (s, map->new_prefix, map->new_len); | ||
47 | memcpy (s + map->new_len, name, name_len); | ||
48 | + free (realpath); | ||
49 | return ggc_strdup (s); | ||
50 | } | ||
51 | |||
52 | -- | ||
53 | 2.8.2 | ||
54 | |||