diff options
| author | Khem Raj <raj.khem@gmail.com> | 2016-12-21 12:08:31 -0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-09 13:39:12 +0000 |
| commit | de1a1cf76e22246bc772f584142e0de357f196eb (patch) | |
| tree | 634fbd2c4d41c19756540b9faa85c10be9eaebaa /meta/recipes-devtools/gcc/gcc-6.3/0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch | |
| parent | cfa8b1ed6fb20d7a4a80b9b938e1810ac450da51 (diff) | |
| download | poky-de1a1cf76e22246bc772f584142e0de357f196eb.tar.gz | |
gcc6: Upgrade to 6.3.0
6.3.0 is a bugfix release in gcc 6 series
(From OE-Core rev: 36ffcd1d7d2ab9dcc91e9c09623a6613a248bc69)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-6.3/0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch')
| -rw-r--r-- | meta/recipes-devtools/gcc/gcc-6.3/0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-6.3/0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch b/meta/recipes-devtools/gcc/gcc-6.3/0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch new file mode 100644 index 0000000000..5d41af44a4 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-6.3/0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch | |||
| @@ -0,0 +1,54 @@ | |||
| 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 | |||
