summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/gcc/gcc/0002-gcc-poison-system-directories.patch37
1 files changed, 27 insertions, 10 deletions
diff --git a/meta/recipes-devtools/gcc/gcc/0002-gcc-poison-system-directories.patch b/meta/recipes-devtools/gcc/gcc/0002-gcc-poison-system-directories.patch
index 367c9e3821..8523af1281 100644
--- a/meta/recipes-devtools/gcc/gcc/0002-gcc-poison-system-directories.patch
+++ b/meta/recipes-devtools/gcc/gcc/0002-gcc-poison-system-directories.patch
@@ -160,10 +160,23 @@ index f82f7d2817b..1da91813b0e 100644
160 @opindex Wno-float-equal 160 @opindex Wno-float-equal
161 @item -Wfloat-equal 161 @item -Wfloat-equal
162diff --git a/gcc/gcc.cc b/gcc/gcc.cc 162diff --git a/gcc/gcc.cc b/gcc/gcc.cc
163index 728332b8153..343e4915097 100644 163index 728332b8153..a63f128cb95 100644
164--- a/gcc/gcc.cc 164--- a/gcc/gcc.cc
165+++ b/gcc/gcc.cc 165+++ b/gcc/gcc.cc
166@@ -1159,6 +1159,8 @@ proper position among the other output files. */ 166@@ -902,6 +902,12 @@ proper position among the other output files. */
167 #define ASM_MAP ""
168 #endif
169
170+#ifdef POISON_BY_DEFAULT
171+#define POISON_IS_ERROR " -Werror=poison-system-directories"
172+#else
173+#define POISON_IS_ERROR
174+#endif
175+
176 /* Assembler options for compressed debug sections. */
177 #if HAVE_LD_COMPRESS_DEBUG == 0
178 /* Reject if the linker cannot write compressed debug sections. */
179@@ -1159,6 +1163,8 @@ proper position among the other output files. */
167 "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \ 180 "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
168 "%X %{o*} %{e*} %{N} %{n} %{r}\ 181 "%X %{o*} %{e*} %{N} %{n} %{r}\
169 %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \ 182 %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}} \
@@ -172,20 +185,24 @@ index 728332b8153..343e4915097 100644
172 %{static|no-pie|static-pie:} %@{L*} %(link_libgcc) " \ 185 %{static|no-pie|static-pie:} %@{L*} %(link_libgcc) " \
173 VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o "" \ 186 VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o "" \
174 %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\ 187 %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\
175@@ -1260,8 +1262,11 @@ static const char *cpp_unique_options = 188@@ -1261,7 +1267,7 @@ static const char *cpp_options =
176 static const char *cpp_options =
177 "%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w}\ 189 "%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w}\
178 %{f*} %{g*:%{%:debug-level-gt(0):%{g*}\ 190 %{f*} %{g*:%{%:debug-level-gt(0):%{g*}\
179- %{!fno-working-directory:-fworking-directory}}} %{O*}\ 191 %{!fno-working-directory:-fworking-directory}}} %{O*}\
180- %{undef} %{save-temps*:-fpch-preprocess}"; 192- %{undef} %{save-temps*:-fpch-preprocess}";
181+ %{!fno-working-directory:-fworking-directory}}} %{O*}" 193+ %{undef} %{save-temps*:-fpch-preprocess}" POISON_IS_ERROR;
182+#ifdef POISON_BY_DEFAULT
183+ " -Werror=poison-system-directories"
184+#endif
185+ " %{undef} %{save-temps*:-fpch-preprocess}";
186 194
187 /* Pass -d* flags, possibly modifying -dumpdir, -dumpbase et al. 195 /* Pass -d* flags, possibly modifying -dumpdir, -dumpbase et al.
188 196
197@@ -1290,7 +1296,7 @@ static const char *cc1_options =
198 %{coverage:-fprofile-arcs -ftest-coverage}\
199 %{fprofile-arcs|fcondition-coverage|fprofile-generate*|coverage:\
200 %{!fprofile-update=single:\
201- %{pthread:-fprofile-update=prefer-atomic}}}";
202+ %{pthread:-fprofile-update=prefer-atomic}}}" POISON_IS_ERROR;
203
204 static const char *asm_options =
205 "%{-target-help:%:print-asm-header()} "
189diff --git a/gcc/incpath.cc b/gcc/incpath.cc 206diff --git a/gcc/incpath.cc b/gcc/incpath.cc
190index 64cdd2f4a..89f42900d 100644 207index 64cdd2f4a..89f42900d 100644
191--- a/gcc/incpath.cc 208--- a/gcc/incpath.cc