tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: further texinfo lossage with GCC 15.1



On Sat, May 24, 2025 at 05:59:35AM +1000, matthew green wrote:
> > What is the best way to deal with this lossage?  I figure we're not
> > updating texinfo anytime soon because the latest version requires Perl.
> >
> > 3 options from the top of my head:
> >
> > 1. we disable the appropriate GCC warning in tools/texinfo/Makfile for all of
> >    texinfo
> > 2. we disable the appropriate GCC warning for cmds.c and makeinfo.c only.
> >    Not sure where best to do that.
> > 3. we hack cmds.[hc] and makeinfo.c so that the problem goes away.  I guess
> >    this mean to change all command functions to take 3 args and mark some of
> >    them __unused.  This is the most work, obviously.
> 
> our texinfo is orphaned at this point (last gpl2 version) so i'm more
> inclined just to fix this in the sources.  ie #3.

I can't say that's unexpected.  And we need to do this anyway for when
gcc 15 hits the tree.

> this now *always* an error, previously was a warning?  in generally,
> we tend to avoid -Werror for tools builds using non-bsd.*.mk framework.
> (it's much harder to avoid warnings on older, or newer, or non-netbsd
> platforms.)

I guess this from https://gcc.gnu.org/gcc-15/changes.html is relevant:
  * C23 by default: GCC 15 changes the default language version for C
    compilation from -std=gnu17 to -std=gnu23. If your code relies on older
    versions of the C standard, you will need to either add -std= to your build
    flags, or port your code; see the porting notes.
and
  * To aid the transition to C23, various diagnostics have been enhanced to
    clarify type errors such as incompatible function types, incorrect argument
    counts, and those involving bool.

It's not particularly clear to me but I think it now considers this an
error by default instead of just a warning.  Maybe because of the switch
to -std=gnu23.

I guess I could research this more but I don't see the point since we're
going to import gcc 15 (or newer) anyway.

> if it's just removing -Werror from here, that would also be OK.

It wasn't compiled with -Werror on the command line.

I don't like ignorring these errors.  I'd rather fix the code than tell
a modern compiler to ignore the error and continue anyway and end up wth
broken tools.

> > For 1. and 2. do we need to introduce a correspong CC_WNO_... in bsd.own.mk?
> 
> this won't help.  those are for building in-tree parts, not tools, and
> especially not for autotools style src/tools/ subdirs.

Yeah.  I took a quick look and didn't see a way..  I was kinda
hoping someone thought it would be possible to pass it from the
tools/texinfo/Makefile throught the Makefile.gnuhost via CFLAGS or
something.

--chris


Home | Main Index | Thread Index | Old Index