]> TLD Linux GIT Repositories - packages/kernel.git/blob - gcc8.patch
- updated to 4.9.327
[packages/kernel.git] / gcc8.patch
1 diff -ur linux-4.14.orig/scripts/gcc-plugins/gcc-common.h linux-4.14/scripts/gcc-plugins/gcc-common.h
2 --- linux-4.14.orig/scripts/gcc-plugins/gcc-common.h    2018-08-19 21:29:20.298229612 +0000
3 +++ linux-4.14/scripts/gcc-plugins/gcc-common.h 2018-08-19 21:33:02.789227107 +0000
4 @@ -97,6 +97,10 @@
5  #include "predict.h"
6  #include "ipa-utils.h"
7  
8 +#if BUILDING_GCC_VERSION >= 8000
9 +#include "stringpool.h"
10 +#endif
11 +
12  #if BUILDING_GCC_VERSION >= 4009
13  #include "attribs.h"
14  #include "varasm.h"
15 diff -ur linux-4.14.orig/scripts/gcc-plugins/latent_entropy_plugin.c linux-4.14/scripts/gcc-plugins/latent_entropy_plugin.c
16 --- linux-4.14.orig/scripts/gcc-plugins/latent_entropy_plugin.c 2018-08-19 21:29:20.301229612 +0000
17 +++ linux-4.14/scripts/gcc-plugins/latent_entropy_plugin.c      2018-08-19 21:50:23.229215392 +0000
18 @@ -262,10 +262,17 @@
19         .decl_required                  = true,
20         .type_required                  = false,
21         .function_type_required         = false,
22 +#if BUILDING_GCC_VERSION >= 8000
23 +       .affects_type_identity          = false,
24         .handler                        = handle_latent_entropy_attribute,
25 +#else
26  #if BUILDING_GCC_VERSION >= 4007
27 -       .affects_type_identity          = false
28 -#endif
29 +       .handler                        = handle_latent_entropy_attribute,
30 +       .affects_type_identity          = false,
31 +#else
32 +       .handler                        = handle_latent_entropy_attribute,
33 +#endif /* >= 4007 */
34 +#endif /* >= 8000 */
35  };
36  
37  static void register_attributes(void *event_data __unused, void *data __unused)
38 diff -ur linux-4.14.orig/scripts/gcc-plugins/randomize_layout_plugin.c linux-4.14/scripts/gcc-plugins/randomize_layout_plugin.c
39 --- linux-4.14.orig/scripts/gcc-plugins/randomize_layout_plugin.c       2018-08-19 21:29:20.303229612 +0000
40 +++ linux-4.14/scripts/gcc-plugins/randomize_layout_plugin.c    2018-08-19 21:55:33.710211897 +0000
41 @@ -589,10 +589,17 @@
42         // need type declaration
43         .type_required  = true,
44         .function_type_required = false,
45 -       .handler                = handle_randomize_layout_attr,
46 +#if BUILDING_GCC_VERSION >= 8000
47 +       .affects_type_identity          = true,
48 +       .handler                        = handle_randomize_layout_attr,
49 +#else
50  #if BUILDING_GCC_VERSION >= 4007
51 -       .affects_type_identity  = true
52 -#endif
53 +       .handler                        = handle_randomize_layout_attr,
54 +       .affects_type_identity          = true,
55 +#else
56 +       .handler                        = handle_randomize_layout_attr,
57 +#endif /* >= 4007 */
58 +#endif /* >= 8000 */
59  };
60  
61  static struct attribute_spec no_randomize_layout_attr = {
62 @@ -604,10 +611,17 @@
63         // need type declaration
64         .type_required  = true,
65         .function_type_required = false,
66 -       .handler                = handle_randomize_layout_attr,
67 +#if BUILDING_GCC_VERSION >= 8000
68 +       .affects_type_identity          = true,
69 +       .handler                        = handle_randomize_layout_attr,
70 +#else
71  #if BUILDING_GCC_VERSION >= 4007
72 -       .affects_type_identity  = true
73 -#endif
74 +       .handler                        = handle_randomize_layout_attr,
75 +       .affects_type_identity          = true,
76 +#else
77 +       .handler                        = handle_randomize_layout_attr,
78 +#endif /* >= 4007 */
79 +#endif /* >= 8000 */
80  };
81  
82  static struct attribute_spec randomize_considered_attr = {
83 @@ -619,10 +633,17 @@
84         // need type declaration
85         .type_required  = true,
86         .function_type_required = false,
87 -       .handler                = handle_randomize_considered_attr,
88 +#if BUILDING_GCC_VERSION >= 8000
89 +       .affects_type_identity          = false,
90 +       .handler                        = handle_randomize_considered_attr,
91 +#else
92  #if BUILDING_GCC_VERSION >= 4007
93 -       .affects_type_identity  = false
94 -#endif
95 +       .handler                        = handle_randomize_considered_attr,
96 +       .affects_type_identity          = false,
97 +#else
98 +       .handler                        = handle_randomize_considered_attr,
99 +#endif /* >= 4007 */
100 +#endif /* >= 8000 */
101  };
102  
103  static struct attribute_spec randomize_performed_attr = {
104 @@ -634,10 +655,17 @@
105         // need type declaration
106         .type_required  = true,
107         .function_type_required = false,
108 -       .handler                = handle_randomize_performed_attr,
109 +#if BUILDING_GCC_VERSION >= 8000
110 +       .affects_type_identity          = false,
111 +       .handler                        = handle_randomize_performed_attr,
112 +#else
113  #if BUILDING_GCC_VERSION >= 4007
114 -       .affects_type_identity  = false
115 -#endif
116 +       .handler                        = handle_randomize_performed_attr,
117 +       .affects_type_identity          = false,
118 +#else
119 +       .handler                        = handle_randomize_performed_attr,
120 +#endif /* >= 4007 */
121 +#endif /* >= 8000 */
122  };
123  
124  static void register_attributes(void *event_data, void *data)
125 diff -ur linux-4.14.orig/scripts/gcc-plugins/structleak_plugin.c linux-4.14/scripts/gcc-plugins/structleak_plugin.c
126 --- linux-4.14.orig/scripts/gcc-plugins/structleak_plugin.c     2018-08-19 21:29:20.304229612 +0000
127 +++ linux-4.14/scripts/gcc-plugins/structleak_plugin.c  2018-08-19 21:51:31.790214620 +0000
128 @@ -64,10 +64,17 @@
129         .decl_required          = false,
130         .type_required          = false,
131         .function_type_required = false,
132 -       .handler                = handle_user_attribute,
133 +#if BUILDING_GCC_VERSION >= 8000
134 +       .affects_type_identity          = true,
135 +       .handler                        = handle_user_attribute,
136 +#else
137  #if BUILDING_GCC_VERSION >= 4007
138 -       .affects_type_identity  = true
139 -#endif
140 +       .handler                        = handle_user_attribute,
141 +       .affects_type_identity          = true,
142 +#else
143 +       .handler                        = handle_user_attribute,
144 +#endif /* >= 4007 */
145 +#endif /* >= 8000 */
146  };
147  
148  static void register_attributes(void *event_data, void *data)