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.
Signed-off-by: Ross Burton <[email protected]> --- .../gcc/0002-gcc-poison-system-directories.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 5a51ae7d960..bfec4477c1e 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 -- 2.34.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#170390): https://lists.openembedded.org/g/openembedded-core/message/170390 Mute This Topic: https://lists.openembedded.org/mt/93524138/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
