On Tue, 2025-01-21 at 18:23 +0000, Ross Burton via lists.openembedded.org wrote: > We have a patch to allow us to 'poison' system include directories, > which are warnings by default but we make them fatal in cross builds. > > However, in the 13.1 upgrade[1] the patch to make the warnings fatal was > dropped in the compiler invocation, so it only took effect for pure > preprocessor calls. This was not noticed at the time as the test case > was flawed, but this has now been fixed. > > Add back the fatal poisoning, and restructure the patch slightly so it > is less invasive. > > [1] oe-core bea46612fd9106cc5b46eb1d81623b6492563c13 > > Signed-off-by: Ross Burton <[email protected]> > --- > .../0002-gcc-poison-system-directories.patch | 35 +++++++++++++------ > 1 file changed, 25 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 367c9e3821b..d8b3d4a9984 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,21 @@ index f82f7d2817b..1da91813b0e 100644 > @opindex Wno-float-equal > @item -Wfloat-equal > diff --git a/gcc/gcc.cc b/gcc/gcc.cc > -index 728332b8153..343e4915097 100644 > +index 728332b8153..a63f128cb95 100644 > --- a/gcc/gcc.cc > +++ b/gcc/gcc.cc > -@@ -1159,6 +1159,8 @@ proper position among the other output files. */ > +@@ -902,6 +902,10 @@ proper position among the other output files. */ > + #define ASM_MAP "" > + #endif > + > ++#ifdef POISON_BY_DEFAULT > ++#define POISON_IS_ERROR " -Werror=poison-system-directories" > ++#endif > ++
I think this needs to be: +#ifdef POISON_BY_DEFAULT +#define POISON_IS_ERROR " -Werror=poison-system-directories" +#else +#define POISON_IS_ERROR +#endif otherwwise POISON_IS_ERROR is undefined and leads to failures building target gcc and gcc-cross-canadian. Fixup in -next I can squash in if you agree. Cheers, Richard
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#210143): https://lists.openembedded.org/g/openembedded-core/message/210143 Mute This Topic: https://lists.openembedded.org/mt/110738539/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
