[libcamera-devel] [PATCH 2/4] meson: enable no-psabi for gcc 9+

Laurent Pinchart laurent.pinchart at ideasonboard.com
Mon Oct 12 13:21:40 CEST 2020


On Mon, Oct 12, 2020 at 11:44:34AM +0100, Kieran Bingham wrote:
> On 12/10/2020 00:52, Laurent Pinchart wrote:
> > On Fri, Oct 09, 2020 at 10:03:39AM +0300, Tomi Valkeinen wrote:
> >> On 09/10/2020 04:37, Laurent Pinchart wrote:
> >>
> >>>> I don't think I get this whole thing =). But I'm fine with increasing
> >>>> the version check to < 10, as I'm currently using gcc 9. I'll probably
> >>>> switch my buildroot to gcc 10 at some point in the near future, and
> >>>> then I can send a new patch.
> >>>
> >>> The idea is that I'd like to keep an eye on ABI breakages introduced by
> >>> gcc, in a "just for my information" fashion for the moment. I don't know
> >>> at this point how such breakages would even be handled (if at all).
> >>>
> >>> "Just for my information" is probably not a good enough excuse to annoy
> >>> everybody with warnings when using new compiler versions though. I'd
> >>> thus agree to drop the version check. I wonder how the gcc developers
> >>> had envisioned this being used though, if there's a warning (which is
> >>> actually not even a warning, but a note), I imagine it was put there
> >>> with a target audience in mind. Or maybe this is just a mess and nobody
> >>> should really pay attention :-)
> >>
> >> Ok. Yes, I don't get this either. What would make sense is, e.g.
> >> "-Wno-psabi=1,4", which would disable warnings for ABI breakages #1
> >> and #4, but allow all the other warnings.
> >>
> >> What I did in kms++ was just:
> >>
> >> if (cpp.get_id() == 'gcc' and
> >>     host_machine.cpu_family() == 'arm' and
> >>     cpp.has_argument('-Wno-psabi'))
> >>
> >>     cpp_arguments += [
> >>         '-Wno-psabi',
> >>     ]
> >> endif
> >>
> >> It's silly to always disable the warning, but I haven't found much
> >> info about it while googling, so currently I'm guessing it's the "this
> >> is just a mess" case.
> > 
> > I think I'm getting convinced that this is indeed the right way forward
> > for now. Kieran, what do you think ?
> 
> The part of all this that I don't like is that GCC doesn't (seem to)
> have a way to disable (/acknowledge) the ABI change from v7, to ignore
> 'just that set'.
> 
> So indeed, it means that these warnings will currently persist forever -
> and then get blurred in with any additional ones. Which is quite
> frustrating.
> 
> Along with the lack of control that we have over what tools actually
> build our library in distro's etc, I fear this might simply be a problem
> we defer to the distributions. It's not something that can be handled
> stand-alone at the library level. I don't particularly want to wave the
> 'someone else's problem' - but there are simply external factors that
> are outside of our control for this issue - so we can't hope to solve
> them all.
> 
> I don't mind disabling it.

I'll push Tomi's patch with a comment updated to remove gcc < 9.

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list