summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2020-03-10 13:48:26 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-03-11 13:44:02 +0000
commitf48d73995c6c86febcb24eb91dd1569a648cb4ae (patch)
treeccab0e10a2ccbb83203732d3298a1edc522ad1cd /meta/recipes-devtools
parent2e2f1980e082f3b0588da9c9712a21c412a68d0f (diff)
downloadpoky-f48d73995c6c86febcb24eb91dd1569a648cb4ae.tar.gz
gcc: strip line numbers from generated code in gcc-plugins on target
The line numbers are influenced by the gcc version on the host used to generate the code. Remove these to ensure the shipped source code is the same. (From OE-Core rev: 5c3d3440809e9d76377af653ac8c5307bc1a01b4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2.inc1
-rw-r--r--meta/recipes-devtools/gcc/gcc-9.2/gen-no-line-numbers.patch170
2 files changed, 171 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-9.2.inc b/meta/recipes-devtools/gcc/gcc-9.2.inc
index 2bae85afe3..2368f35867 100644
--- a/meta/recipes-devtools/gcc/gcc-9.2.inc
+++ b/meta/recipes-devtools/gcc/gcc-9.2.inc
@@ -70,6 +70,7 @@ SRC_URI = "\
70 file://CVE-2019-15847_2.patch \ 70 file://CVE-2019-15847_2.patch \
71 file://CVE-2019-15847_3.patch \ 71 file://CVE-2019-15847_3.patch \
72 file://re-PR-target-91102-aarch64-ICE-on-Linux-kernel-with-.patch \ 72 file://re-PR-target-91102-aarch64-ICE-on-Linux-kernel-with-.patch \
73 file://gen-no-line-numbers.patch \
73" 74"
74S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}" 75S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
75SRC_URI[md5sum] = "3818ad8600447f05349098232c2ddc78" 76SRC_URI[md5sum] = "3818ad8600447f05349098232c2ddc78"
diff --git a/meta/recipes-devtools/gcc/gcc-9.2/gen-no-line-numbers.patch b/meta/recipes-devtools/gcc/gcc-9.2/gen-no-line-numbers.patch
new file mode 100644
index 0000000000..8e2c3f5809
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-9.2/gen-no-line-numbers.patch
@@ -0,0 +1,170 @@
1Inserting line numbers into generated code means its not always reproducible wth
2differing versions of host gcc. Void the issue by not adding these.
3
4Upstream-Status: Inappropriate [OE Reproducibility specific]
5Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
6
7diff --git a/gcc/gengtype.c b/gcc/gengtype.c
8index 53317337c..bbb261516 100644
9--- a/gcc/gengtype.c
10+++ b/gcc/gengtype.c
11@@ -991,7 +991,7 @@ create_field_at (pair_p next, type_p type, const char *name, options_p opt,
12 /* Create a fake field with the given type and name. NEXT is the next
13 field in the chain. */
14 #define create_field(next,type,name) \
15- create_field_all (next,type,name, 0, this_file, __LINE__)
16+ create_field_all (next,type,name, 0, this_file, 0)
17
18 /* Like create_field, but the field is only valid when condition COND
19 is true. */
20@@ -1024,7 +1024,7 @@ create_optional_field_ (pair_p next, type_p type, const char *name,
21 }
22
23 #define create_optional_field(next,type,name,cond) \
24- create_optional_field_(next,type,name,cond,__LINE__)
25+ create_optional_field_(next,type,name,cond,0)
26
27 /* Reverse a linked list of 'struct pair's in place. */
28 pair_p
29@@ -5186,7 +5186,7 @@ main (int argc, char **argv)
30 /* These types are set up with #define or else outside of where
31 we can see them. We should initialize them before calling
32 read_input_list. */
33-#define POS_HERE(Call) do { pos.file = this_file; pos.line = __LINE__; \
34+#define POS_HERE(Call) do { pos.file = this_file; pos.line = 0; \
35 Call;} while (0)
36 POS_HERE (do_scalar_typedef ("CUMULATIVE_ARGS", &pos));
37 POS_HERE (do_scalar_typedef ("REAL_VALUE_TYPE", &pos));
38diff --git a/gcc/genmodes.c b/gcc/genmodes.c
39index f33eefa24..07bef9eeb 100644
40--- a/gcc/genmodes.c
41+++ b/gcc/genmodes.c
42@@ -429,7 +429,7 @@ complete_all_modes (void)
43 }
44
45 /* For each mode in class CLASS, construct a corresponding complex mode. */
46-#define COMPLEX_MODES(C) make_complex_modes (MODE_##C, __FILE__, __LINE__)
47+#define COMPLEX_MODES(C) make_complex_modes (MODE_##C, __FILE__, 0)
48 static void
49 make_complex_modes (enum mode_class cl,
50 const char *file, unsigned int line)
51@@ -487,7 +487,7 @@ make_complex_modes (enum mode_class cl,
52 /* For all modes in class CL, construct vector modes of width
53 WIDTH, having as many components as necessary. */
54 #define VECTOR_MODES_WITH_PREFIX(PREFIX, C, W) \
55- make_vector_modes (MODE_##C, #PREFIX, W, __FILE__, __LINE__)
56+ make_vector_modes (MODE_##C, #PREFIX, W, __FILE__, 0)
57 #define VECTOR_MODES(C, W) VECTOR_MODES_WITH_PREFIX (V, C, W)
58 static void ATTRIBUTE_UNUSED
59 make_vector_modes (enum mode_class cl, const char *prefix, unsigned int width,
60@@ -538,7 +538,7 @@ make_vector_modes (enum mode_class cl, const char *prefix, unsigned int width,
61 /* Create a vector of booleans called NAME with COUNT elements and
62 BYTESIZE bytes in total. */
63 #define VECTOR_BOOL_MODE(NAME, COUNT, BYTESIZE) \
64- make_vector_bool_mode (#NAME, COUNT, BYTESIZE, __FILE__, __LINE__)
65+ make_vector_bool_mode (#NAME, COUNT, BYTESIZE, __FILE__, 0)
66 static void ATTRIBUTE_UNUSED
67 make_vector_bool_mode (const char *name, unsigned int count,
68 unsigned int bytesize, const char *file,
69@@ -560,7 +560,7 @@ make_vector_bool_mode (const char *name, unsigned int count,
70 /* Input. */
71
72 #define _SPECIAL_MODE(C, N) \
73- make_special_mode (MODE_##C, #N, __FILE__, __LINE__)
74+ make_special_mode (MODE_##C, #N, __FILE__, 0)
75 #define RANDOM_MODE(N) _SPECIAL_MODE (RANDOM, N)
76 #define CC_MODE(N) _SPECIAL_MODE (CC, N)
77
78@@ -573,7 +573,7 @@ make_special_mode (enum mode_class cl, const char *name,
79
80 #define INT_MODE(N, Y) FRACTIONAL_INT_MODE (N, -1U, Y)
81 #define FRACTIONAL_INT_MODE(N, B, Y) \
82- make_int_mode (#N, B, Y, __FILE__, __LINE__)
83+ make_int_mode (#N, B, Y, __FILE__, 0)
84
85 static void
86 make_int_mode (const char *name,
87@@ -586,16 +586,16 @@ make_int_mode (const char *name,
88 }
89
90 #define FRACT_MODE(N, Y, F) \
91- make_fixed_point_mode (MODE_FRACT, #N, Y, 0, F, __FILE__, __LINE__)
92+ make_fixed_point_mode (MODE_FRACT, #N, Y, 0, F, __FILE__, 0)
93
94 #define UFRACT_MODE(N, Y, F) \
95- make_fixed_point_mode (MODE_UFRACT, #N, Y, 0, F, __FILE__, __LINE__)
96+ make_fixed_point_mode (MODE_UFRACT, #N, Y, 0, F, __FILE__, 0)
97
98 #define ACCUM_MODE(N, Y, I, F) \
99- make_fixed_point_mode (MODE_ACCUM, #N, Y, I, F, __FILE__, __LINE__)
100+ make_fixed_point_mode (MODE_ACCUM, #N, Y, I, F, __FILE__, 0)
101
102 #define UACCUM_MODE(N, Y, I, F) \
103- make_fixed_point_mode (MODE_UACCUM, #N, Y, I, F, __FILE__, __LINE__)
104+ make_fixed_point_mode (MODE_UACCUM, #N, Y, I, F, __FILE__, 0)
105
106 /* Create a fixed-point mode by setting CL, NAME, BYTESIZE, IBIT, FBIT,
107 FILE, and LINE. */
108@@ -616,7 +616,7 @@ make_fixed_point_mode (enum mode_class cl,
109
110 #define FLOAT_MODE(N, Y, F) FRACTIONAL_FLOAT_MODE (N, -1U, Y, F)
111 #define FRACTIONAL_FLOAT_MODE(N, B, Y, F) \
112- make_float_mode (#N, B, Y, #F, __FILE__, __LINE__)
113+ make_float_mode (#N, B, Y, #F, __FILE__, 0)
114
115 static void
116 make_float_mode (const char *name,
117@@ -633,7 +633,7 @@ make_float_mode (const char *name,
118 #define DECIMAL_FLOAT_MODE(N, Y, F) \
119 FRACTIONAL_DECIMAL_FLOAT_MODE (N, -1U, Y, F)
120 #define FRACTIONAL_DECIMAL_FLOAT_MODE(N, B, Y, F) \
121- make_decimal_float_mode (#N, B, Y, #F, __FILE__, __LINE__)
122+ make_decimal_float_mode (#N, B, Y, #F, __FILE__, 0)
123
124 static void
125 make_decimal_float_mode (const char *name,
126@@ -648,7 +648,7 @@ make_decimal_float_mode (const char *name,
127 }
128
129 #define RESET_FLOAT_FORMAT(N, F) \
130- reset_float_format (#N, #F, __FILE__, __LINE__)
131+ reset_float_format (#N, #F, __FILE__, 0)
132 static void ATTRIBUTE_UNUSED
133 reset_float_format (const char *name, const char *format,
134 const char *file, unsigned int line)
135@@ -669,7 +669,7 @@ reset_float_format (const char *name, const char *format,
136
137 /* __intN support. */
138 #define INT_N(M,PREC) \
139- make_int_n (#M, PREC, __FILE__, __LINE__)
140+ make_int_n (#M, PREC, __FILE__, 0)
141 static void ATTRIBUTE_UNUSED
142 make_int_n (const char *m, int bitsize,
143 const char *file, unsigned int line)
144@@ -698,7 +698,7 @@ make_int_n (const char *m, int bitsize,
145 /* Partial integer modes are specified by relation to a full integer
146 mode. */
147 #define PARTIAL_INT_MODE(M,PREC,NAME) \
148- make_partial_integer_mode (#M, #NAME, PREC, __FILE__, __LINE__)
149+ make_partial_integer_mode (#M, #NAME, PREC, __FILE__, 0)
150 static void ATTRIBUTE_UNUSED
151 make_partial_integer_mode (const char *base, const char *name,
152 unsigned int precision,
153@@ -725,7 +725,7 @@ make_partial_integer_mode (const char *base, const char *name,
154 /* A single vector mode can be specified by naming its component
155 mode and the number of components. */
156 #define VECTOR_MODE(C, M, N) \
157- make_vector_mode (MODE_##C, #M, N, __FILE__, __LINE__);
158+ make_vector_mode (MODE_##C, #M, N, __FILE__, 0);
159 static void ATTRIBUTE_UNUSED
160 make_vector_mode (enum mode_class bclass,
161 const char *base,
162@@ -768,7 +768,7 @@ make_vector_mode (enum mode_class bclass,
163
164 /* Adjustability. */
165 #define _ADD_ADJUST(A, M, X, C1, C2) \
166- new_adjust (#M, &adj_##A, #A, #X, MODE_##C1, MODE_##C2, __FILE__, __LINE__)
167+ new_adjust (#M, &adj_##A, #A, #X, MODE_##C1, MODE_##C2, __FILE__, 0)
168
169 #define ADJUST_NUNITS(M, X) _ADD_ADJUST (nunits, M, X, RANDOM, RANDOM)
170 #define ADJUST_BYTESIZE(M, X) _ADD_ADJUST (bytesize, M, X, RANDOM, RANDOM)