summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2022-09-07 14:02:06 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-09-07 21:28:41 +0100
commit59ec2d317d23f08b8368e30ce7c0183925bc502f (patch)
tree0bd5fdb7971e26c12ce19fd06ab90fa4016d440e /meta/recipes-devtools/gcc
parent8cbbc0ac7d8f981f8dac05c18ecb9b148cb40f53 (diff)
downloadpoky-59ec2d317d23f08b8368e30ce7c0183925bc502f.tar.gz
gcc-cross: pass -Werror=poison-system-directories to compiler stages
The -Werror=poison-system-directories argument was being passed to runs where _just_ CPP was being invoked, so it wasn't passed to runs which also compile. Add the options to cc1_options so that compile runs also have fatal poisoning errors. (From OE-Core rev: e903b29f89e81de244ac77da464c71b718c6854d) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc')
-rw-r--r--meta/recipes-devtools/gcc/gcc/0002-gcc-poison-system-directories.patch13
1 files changed, 13 insertions, 0 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 5a51ae7d96..bfec4477c1 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
@@ -185,6 +185,19 @@ index bb07cc244e3..ce161d3c853 100644
185 185
186 /* Pass -d* flags, possibly modifying -dumpdir, -dumpbase et al. 186 /* Pass -d* flags, possibly modifying -dumpdir, -dumpbase et al.
187 187
188@@ -1265,7 +1270,11 @@ static const char *cc1_options =
189 %{coverage:-fprofile-arcs -ftest-coverage}\
190 %{fprofile-arcs|fprofile-generate*|coverage:\
191 %{!fprofile-update=single:\
192- %{pthread:-fprofile-update=prefer-atomic}}}";
193+ %{pthread:-fprofile-update=prefer-atomic}}}"
194+#ifdef POISON_BY_DEFAULT
195+ " -Werror=poison-system-directories"
196+#endif
197+ ;
198
199 static const char *asm_options =
200 "%{-target-help:%:print-asm-header()} "
188diff --git a/gcc/incpath.cc b/gcc/incpath.cc 201diff --git a/gcc/incpath.cc b/gcc/incpath.cc
189index bd2a97938eb..c80f100f476 100644 202index bd2a97938eb..c80f100f476 100644
190--- a/gcc/incpath.cc 203--- a/gcc/incpath.cc