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>
This commit is contained in:
Hongxu Jia 2016-03-18 05:01:44 -04:00 committed by Richard Purdie
parent 2faa718c8b
commit 79850060c3
4 changed files with 88 additions and 0 deletions

View File

@ -88,6 +88,7 @@ SRC_URI = "\
file://0070-libstdc-musl.patch \
file://0071-Ignore-fdebug-prefix-map-in-producer-string-by-Danie.patch \
file://0072-support-ffile-prefix-map.patch \
file://0073-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch \
"
SRC_URI[md5sum] = "6f831b4d251872736e8e9cc09746f327"
SRC_URI[sha256sum] = "2332b2a5a321b57508b9031354a8503af6fdfb868b8c1748d33028d100a8b67e"

View File

@ -0,0 +1,43 @@
From 5e10baff84038d26dc3d59b2412ba1db92cb8274 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Thu, 17 Mar 2016 00:34:01 -0400
Subject: [PATCH 2/2] Reuse -fdebug-prefix-map to replace -ffile-prefix-map
The oe-core may use external toolchain to compile,
which may 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.
Upstream-Status: Inappropriate[oe-core specific]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
gcc/opts-global.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gcc/opts-global.c b/gcc/opts-global.c
index 111884b..037f6c8 100644
--- a/gcc/opts-global.c
+++ b/gcc/opts-global.c
@@ -42,6 +42,7 @@ along with GCC; see the file COPYING3. If not see
#include "toplev.h"
#include "tree-pass.h"
#include "context.h"
+#include "file-map.h"
typedef const char *const_char_p; /* For DEF_VEC_P. */
@@ -354,6 +355,9 @@ handle_common_deferred_options (void)
case OPT_fdebug_prefix_map_:
add_debug_prefix_map (opt->arg);
+
+ /* Reuse -fdebug-prefix-map to replace -ffile-prefix-map */
+ add_file_prefix_map (opt->arg);
break;
case OPT_fdump_:
--
1.9.1

View File

@ -84,6 +84,7 @@ SRC_URI = "\
file://0052-nios2-use-ret-with-r31.patch \
file://0053-expr.c-PR-target-65358-Avoid-clobbering-partial-argu.patch \
file://0054-support-ffile-prefix-map.patch \
file://0055-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch \
"
BACKPORTS = ""

View File

@ -0,0 +1,43 @@
From 14b79641ff6b0008aef7fbf7aa300daec11d1e78 Mon Sep 17 00:00:00 2001
From: Hongxu Jia <hongxu.jia@windriver.com>
Date: Wed, 16 Mar 2016 05:39:59 -0400
Subject: [PATCH] Reuse -fdebug-prefix-map to replace -ffile-prefix-map
The oe-core may use external toolchain to compile,
which may 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.
Upstream-Status: Inappropriate[oe-core specific]
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
gcc/opts-global.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gcc/opts-global.c b/gcc/opts-global.c
index b61bdcf..51bb177 100644
--- a/gcc/opts-global.c
+++ b/gcc/opts-global.c
@@ -50,6 +50,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "dbgcnt.h"
#include "debug.h"
+#include "file-map.h"
#include "hash-map.h"
#include "plugin-api.h"
#include "ipa-ref.h"
@@ -378,6 +379,9 @@ handle_common_deferred_options (void)
case OPT_fdebug_prefix_map_:
add_debug_prefix_map (opt->arg);
+
+ /* Reuse -fdebug-prefix-map to replace -ffile-prefix-map */
+ add_file_prefix_map (opt->arg);
break;
case OPT_fdump_:
--
1.9.1