NetBSD-Bugs archive

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

Re: misc/54581: Issues building NetBSD-9 under NetBSD-5.2

    Date:        Mon, 30 Sep 2019 13:54:15 -0700
    From:        Brian Buhrow <>
    Message-ID:  <>

  | 	hello Robert.  In continuing to try and build netbsd-9 under
  | NetBSD-5.2, I've run into one of these compiler options that gcc 4.1
  | doesn't like and which you committed about a year ago to the tree.

For that one I am fairly sure that I was just copying the same thing
that was done for a similar problem in another file.

But for these -Wno-xxx options, in general, they are needed whenever
the compiler implements the -Wxxx option (which the build's -Wall would
turn on) - if the compiler is old enough to not have that option, then
turning it off (which it also doesn't recognise) isn't going to work.

This kind of thing can be handled in the Makefile with a test on the
gcc version being used, if we can find out which gcc version introduced
the relevant option - and only include the -Wno-xxx for versions of gcc
that are not older than the version where the option appeared.

But I am not sure it is really worth it - that is, even with these band
aids, which could be done with no worse effects than more clutter in the
Makefiles - I am not sure you're going to be able to get a NetBSD 5 gcc to
build -9 or HEAD.

What you should do is simply remove any options like this from your source
files, when the compiler objects (comment them out with an easy pattern
to grep for later, like "#XYZ#" or something) and see if simply doing that
(as many times as is needed) is enough to get the build to complete.

If it is, do a complete recursive grep through the source tree, looking
for that pattern, so we know everywhere that would need to be changed, and
then we can see if it is worth doing this in HEAD, and requesting a pullup
to -9.


Home | Main Index | Thread Index | Old Index