From de1a1cf76e22246bc772f584142e0de357f196eb Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 21 Dec 2016 12:08:31 -0800 Subject: 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 Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- ...-fdebug-prefix-map-support-to-remap-sourc.patch | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 meta/recipes-devtools/gcc/gcc-6.3/0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch (limited to 'meta/recipes-devtools/gcc/gcc-6.3/0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch') 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 @@ +From 6ab23e88aef22bbabee7b9600c459ff39547bb66 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia +Date: Thu, 24 Mar 2016 11:23:14 -0400 +Subject: [PATCH 44/46] gcc/final.c: -fdebug-prefix-map support to remap + sources with relative path + +PR other/70428 +* final.c (remap_debug_filename): Use lrealpath to translate +relative path before remapping + +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70428 +Upstream-Status: Submitted [gcc-patches@gcc.gnu.org] + +Signed-off-by: Hongxu Jia +--- + gcc/final.c | 15 ++++++++++++--- + 1 file changed, 12 insertions(+), 3 deletions(-) + +diff --git a/gcc/final.c b/gcc/final.c +index 55cf509..23293e5 100644 +--- a/gcc/final.c ++++ b/gcc/final.c +@@ -1554,16 +1554,25 @@ remap_debug_filename (const char *filename) + const char *name; + size_t name_len; + ++ /* Support to remap filename with relative path */ ++ char *realpath = lrealpath (filename); ++ if (realpath == NULL) ++ return filename; ++ + for (map = debug_prefix_maps; map; map = map->next) +- if (filename_ncmp (filename, map->old_prefix, map->old_len) == 0) ++ if (filename_ncmp (realpath, map->old_prefix, map->old_len) == 0) + break; + if (!map) +- return filename; +- name = filename + map->old_len; ++ { ++ free (realpath); ++ return filename; ++ } ++ name = realpath + map->old_len; + name_len = strlen (name) + 1; + s = (char *) alloca (name_len + map->new_len); + memcpy (s, map->new_prefix, map->new_len); + memcpy (s + map->new_len, name, name_len); ++ free (realpath); + return ggc_strdup (s); + } + +-- +2.8.2 + -- cgit v1.2.3-54-g00ecf