On Tue, Sep 16, 2025 at 11:45 PM Richard Biener
<[email protected]> wrote:
>
> On Wed, Sep 17, 2025 at 3:18 AM Andrew Pinski
> <[email protected]> wrote:
> >
> > While running uninclude on PR99912's preprocessed source uninclude
> > didn't uninclude some of the x86_64 target headers. This was because
> > `lib/gcc/<anything>/include` was not noticed as an possible system
> > include dir. It supported `gcc-lib/<anything>/include` though.
>
> OK, but I'll note that sometimes this can break things given new
> intrinsics can be added in later compilers only.

Understood, though in the case of PR99912, the uninclude is needed due
to the removal of Xeon Phi ISA support in GCC 15. The AVX10_256
support was also removed in GCC 15 which will have a similar effect on
other preprocessed sources too.
I am not saying uninclude is perfect here though but it definitely
helped to get a compilable testcase for PR  99912 again.

Thanks,
Andrew

>
> > contrib/ChangeLog:
> >
> >         * uninclude: Add `lib/gcc/<anything>/include`.
> > ---
> >  contrib/uninclude | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/contrib/uninclude b/contrib/uninclude
> > index 5612e655a98..f445bfeeb05 100755
> > --- a/contrib/uninclude
> > +++ b/contrib/uninclude
> > @@ -27,13 +27,14 @@
> >
> >  # Header files whose pathnames contain any of the following patterns
> >  # are considered as standard headers: usr/include, g++-include,
> > -# include/g++, include/c++/<version>, gcc-lib/<anything>/include.
> > +# include/g++, include/c++/<version>, gcc-lib/<anything>/include,
> > +# lib/gcc/<anything>/include.
> >
> >  gawk ${EXCLUDEPATT+-vexclude="$EXCLUDEPATT"} \
> >       ${INCLUDEPATT+-vinclude="$INCLUDEPATT"} '
> >  BEGIN {
> >    skipping = 0;
> > -  cppline = "^# [0-9]+ 
> > \"[^\"]*/(usr/include|g\\+\\+-include|include/g\\+\\+|include/c\\+\\+/[^/]+|gcc-lib/[^\"]+/include|gcc/include)/([^\"]+)\"(
> >  [1-4])*$"
> > +  cppline = "^# [0-9]+ 
> > \"[^\"]*/(usr/include|g\\+\\+-include|include/g\\+\\+|include/c\\+\\+/[^/]+|gcc-lib/[^\"]+/include|lib/gcc/[^\"]+/include|gcc/include)/([^\"]+)\"(
> >  [1-4])*$"
> >  }
> >  !skipping && $0 ~ cppline &&
> >  (exclude == "" || $3 !~ exclude) && (include == "" || $3 ~ include) {
> > --
> > 2.43.0
> >

Reply via email to