diff options
author | Hongxu Jia <hongxu.jia@windriver.com> | 2016-03-18 05:01:44 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-20 23:12:31 +0000 |
commit | 79850060c35eec0fe04814e530a3f46cb94d7075 (patch) | |
tree | 085826e8c9a10e4b308bffb67435d7e35c4f98e9 | |
parent | 2faa718c8b6f4847237e31b67b3c3fd4fab7ff44 (diff) | |
download | poky-79850060c35eec0fe04814e530a3f46cb94d7075.tar.gz |
gcc-5.3/gcc-4.9:Reuse -fdebug-prefix-map to replace -ffile-prefix-map
The oe-core may use external toolchain for compiling,
which did not support -ffile-prefix-map.
Since we use -fdebug-prefix-map to do the same thing,
so we could reuse it to replace -ffile-prefix-map.
[YOCTO #7058]
(From OE-Core rev: cec9ee4d32d96e8717f63268a00888260eae1b30)
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
4 files changed, 88 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.9.inc b/meta/recipes-devtools/gcc/gcc-4.9.inc index 22783b2dc0..87aa7dade7 100644 --- a/meta/recipes-devtools/gcc/gcc-4.9.inc +++ b/meta/recipes-devtools/gcc/gcc-4.9.inc | |||
@@ -88,6 +88,7 @@ SRC_URI = "\ | |||
88 | file://0070-libstdc-musl.patch \ | 88 | file://0070-libstdc-musl.patch \ |
89 | file://0071-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch \ | 89 | file://0071-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch \ |
90 | file://0072-support-ffile-prefix-map.patch \ | 90 | file://0072-support-ffile-prefix-map.patch \ |
91 | file://0073-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch \ | ||
91 | " | 92 | " |
92 | SRC_URI[md5sum] = "6f831b4d251872736e8e9cc09746f327" | 93 | SRC_URI[md5sum] = "6f831b4d251872736e8e9cc09746f327" |
93 | SRC_URI[sha256sum] = "2332b2a5a321b57508b9031354a8503af6fdfb868b8c1748d33028d100a8b67e" | 94 | SRC_URI[sha256sum] = "2332b2a5a321b57508b9031354a8503af6fdfb868b8c1748d33028d100a8b67e" |
diff --git a/meta/recipes-devtools/gcc/gcc-4.9/0073-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch b/meta/recipes-devtools/gcc/gcc-4.9/0073-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch new file mode 100644 index 0000000000..94e45ed0aa --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.9/0073-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From 5e10baff84038d26dc3d59b2412ba1db92cb8274 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Thu, 17 Mar 2016 00:34:01 -0400 | ||
4 | Subject: [PATCH 2/2] Reuse -fdebug-prefix-map to replace -ffile-prefix-map | ||
5 | |||
6 | The oe-core may use external toolchain to compile, | ||
7 | which may not support -ffile-prefix-map. | ||
8 | |||
9 | Since we use -fdebug-prefix-map to do the same thing, | ||
10 | so we could reuse it to replace -ffile-prefix-map. | ||
11 | |||
12 | Upstream-Status: Inappropriate[oe-core specific] | ||
13 | |||
14 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
15 | --- | ||
16 | gcc/opts-global.c | 4 ++++ | ||
17 | 1 file changed, 4 insertions(+) | ||
18 | |||
19 | diff --git a/gcc/opts-global.c b/gcc/opts-global.c | ||
20 | index 111884b..037f6c8 100644 | ||
21 | --- a/gcc/opts-global.c | ||
22 | +++ b/gcc/opts-global.c | ||
23 | @@ -42,6 +42,7 @@ along with GCC; see the file COPYING3. If not see | ||
24 | #include "toplev.h" | ||
25 | #include "tree-pass.h" | ||
26 | #include "context.h" | ||
27 | +#include "file-map.h" | ||
28 | |||
29 | typedef const char *const_char_p; /* For DEF_VEC_P. */ | ||
30 | |||
31 | @@ -354,6 +355,9 @@ handle_common_deferred_options (void) | ||
32 | |||
33 | case OPT_fdebug_prefix_map_: | ||
34 | add_debug_prefix_map (opt->arg); | ||
35 | + | ||
36 | + /* Reuse -fdebug-prefix-map to replace -ffile-prefix-map */ | ||
37 | + add_file_prefix_map (opt->arg); | ||
38 | break; | ||
39 | |||
40 | case OPT_fdump_: | ||
41 | -- | ||
42 | 1.9.1 | ||
43 | |||
diff --git a/meta/recipes-devtools/gcc/gcc-5.3.inc b/meta/recipes-devtools/gcc/gcc-5.3.inc index 4861cfcb71..aa011fd03d 100644 --- a/meta/recipes-devtools/gcc/gcc-5.3.inc +++ b/meta/recipes-devtools/gcc/gcc-5.3.inc | |||
@@ -84,6 +84,7 @@ SRC_URI = "\ | |||
84 | file://0052-nios2-use-ret-with-r31.patch \ | 84 | file://0052-nios2-use-ret-with-r31.patch \ |
85 | file://0053-expr.c-PR-target-65358-Avoid-clobbering-partial-argu.patch \ | 85 | file://0053-expr.c-PR-target-65358-Avoid-clobbering-partial-argu.patch \ |
86 | file://0054-support-ffile-prefix-map.patch \ | 86 | file://0054-support-ffile-prefix-map.patch \ |
87 | file://0055-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch \ | ||
87 | " | 88 | " |
88 | 89 | ||
89 | BACKPORTS = "" | 90 | BACKPORTS = "" |
diff --git a/meta/recipes-devtools/gcc/gcc-5.3/0055-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch b/meta/recipes-devtools/gcc/gcc-5.3/0055-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch new file mode 100644 index 0000000000..c7caed8c86 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-5.3/0055-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From 14b79641ff6b0008aef7fbf7aa300daec11d1e78 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Wed, 16 Mar 2016 05:39:59 -0400 | ||
4 | Subject: [PATCH] Reuse -fdebug-prefix-map to replace -ffile-prefix-map | ||
5 | |||
6 | The oe-core may use external toolchain to compile, | ||
7 | which may not support -ffile-prefix-map. | ||
8 | |||
9 | Since we use -fdebug-prefix-map to do the same thing, | ||
10 | so we could reuse it to replace -ffile-prefix-map. | ||
11 | |||
12 | Upstream-Status: Inappropriate[oe-core specific] | ||
13 | |||
14 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
15 | --- | ||
16 | gcc/opts-global.c | 4 ++++ | ||
17 | 1 file changed, 4 insertions(+) | ||
18 | |||
19 | diff --git a/gcc/opts-global.c b/gcc/opts-global.c | ||
20 | index b61bdcf..51bb177 100644 | ||
21 | --- a/gcc/opts-global.c | ||
22 | +++ b/gcc/opts-global.c | ||
23 | @@ -50,6 +50,7 @@ along with GCC; see the file COPYING3. If not see | ||
24 | #include "rtl.h" | ||
25 | #include "dbgcnt.h" | ||
26 | #include "debug.h" | ||
27 | +#include "file-map.h" | ||
28 | #include "hash-map.h" | ||
29 | #include "plugin-api.h" | ||
30 | #include "ipa-ref.h" | ||
31 | @@ -378,6 +379,9 @@ handle_common_deferred_options (void) | ||
32 | |||
33 | case OPT_fdebug_prefix_map_: | ||
34 | add_debug_prefix_map (opt->arg); | ||
35 | + | ||
36 | + /* Reuse -fdebug-prefix-map to replace -ffile-prefix-map */ | ||
37 | + add_file_prefix_map (opt->arg); | ||
38 | break; | ||
39 | |||
40 | case OPT_fdump_: | ||
41 | -- | ||
42 | 1.9.1 | ||
43 | |||