From 59ec2d317d23f08b8368e30ce7c0183925bc502f Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Wed, 7 Sep 2022 14:02:06 +0100 Subject: 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 Signed-off-by: Richard Purdie --- .../gcc/gcc/0002-gcc-poison-system-directories.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'meta/recipes-devtools/gcc') 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 /* Pass -d* flags, possibly modifying -dumpdir, -dumpbase et al. +@@ -1265,7 +1270,11 @@ static const char *cc1_options = + %{coverage:-fprofile-arcs -ftest-coverage}\ + %{fprofile-arcs|fprofile-generate*|coverage:\ + %{!fprofile-update=single:\ +- %{pthread:-fprofile-update=prefer-atomic}}}"; ++ %{pthread:-fprofile-update=prefer-atomic}}}" ++#ifdef POISON_BY_DEFAULT ++ " -Werror=poison-system-directories" ++#endif ++ ; + + static const char *asm_options = + "%{-target-help:%:print-asm-header()} " diff --git a/gcc/incpath.cc b/gcc/incpath.cc index bd2a97938eb..c80f100f476 100644 --- a/gcc/incpath.cc -- cgit v1.2.3-54-g00ecf