diff options
author | Khem Raj <raj.khem@gmail.com> | 2011-04-30 12:37:47 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-05-05 12:26:41 +0100 |
commit | 478deec11f3349d61b1a922f047dc958dc07262a (patch) | |
tree | 1843907b36de2bcb8f821d49d8c9a88014ef0dc7 /meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0039-PR-preprocessor-48248.patch | |
parent | d42dccf886983ba14ccc868041d7bea0cf1a260e (diff) | |
download | poky-478deec11f3349d61b1a922f047dc958dc07262a.tar.gz |
gcc-4.6.0: Backport FSF 4.6 branch patches
This is set of bugfixes that has been done on
FSF gcc-4_2-branch since 4.6.0 was released
They will roll into 4.6.1 release once that
happens in coming approx 6 months time then
we can simply remove them thats the reason
so use a separate .inc file to define the
SRC_URI additions
(From OE-Core rev: b0d5b9f12adbce2c4a0df6059f5671188cd32293)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0039-PR-preprocessor-48248.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0039-PR-preprocessor-48248.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0039-PR-preprocessor-48248.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0039-PR-preprocessor-48248.patch new file mode 100644 index 0000000000..b06340b955 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0039-PR-preprocessor-48248.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | From 0d6afd28da26c4b09e1eb2b16d7a3c021fae7372 Mon Sep 17 00:00:00 2001 | ||
2 | From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
3 | Date: Tue, 29 Mar 2011 20:30:06 +0000 | ||
4 | Subject: [PATCH 039/200] PR preprocessor/48248 | ||
5 | * c-ppoutput.c (print): Add src_file field. | ||
6 | (init_pp_output): Initialize it. | ||
7 | (maybe_print_line): Don't optimize by adding up to 8 newlines | ||
8 | if map->to_file and print.src_file are different file. | ||
9 | (print_line): Update print.src_file. | ||
10 | |||
11 | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@171697 138bc75d-0d04-0410-961f-82ee72b054a4 | ||
12 | |||
13 | index 57ed676..9ebac42 100644 | ||
14 | --- a/gcc/c-family/c-ppoutput.c | ||
15 | +++ b/gcc/c-family/c-ppoutput.c | ||
16 | @@ -36,6 +36,7 @@ static struct | ||
17 | int src_line; /* Line number currently being written. */ | ||
18 | unsigned char printed; /* Nonzero if something output at line. */ | ||
19 | bool first_time; /* pp_file_change hasn't been called yet. */ | ||
20 | + const char *src_file; /* Current source file. */ | ||
21 | } print; | ||
22 | |||
23 | /* Defined and undefined macros being queued for output with -dU at | ||
24 | @@ -153,6 +154,7 @@ init_pp_output (FILE *out_stream) | ||
25 | print.prev = 0; | ||
26 | print.outf = out_stream; | ||
27 | print.first_time = 1; | ||
28 | + print.src_file = ""; | ||
29 | } | ||
30 | |||
31 | /* Writes out the preprocessed file, handling spacing and paste | ||
32 | @@ -312,7 +314,9 @@ maybe_print_line (source_location src_loc) | ||
33 | print.printed = 0; | ||
34 | } | ||
35 | |||
36 | - if (src_line >= print.src_line && src_line < print.src_line + 8) | ||
37 | + if (src_line >= print.src_line | ||
38 | + && src_line < print.src_line + 8 | ||
39 | + && strcmp (map->to_file, print.src_file) == 0) | ||
40 | { | ||
41 | while (src_line > print.src_line) | ||
42 | { | ||
43 | @@ -344,6 +348,7 @@ print_line (source_location src_loc, const char *special_flags) | ||
44 | unsigned char *p; | ||
45 | |||
46 | print.src_line = SOURCE_LINE (map, src_loc); | ||
47 | + print.src_file = map->to_file; | ||
48 | |||
49 | /* cpp_quote_string does not nul-terminate, so we have to do it | ||
50 | ourselves. */ | ||
51 | -- | ||
52 | 1.7.0.4 | ||
53 | |||