[libcamera-devel] [PATCH] libcamera: Set -Wno-psabi on gcc 7 and 8 for arm

Laurent Pinchart laurent.pinchart at ideasonboard.com
Fri May 1 13:46:56 CEST 2020


Hi Kieran,

On Fri, May 01, 2020 at 09:56:39AM +0100, Kieran Bingham wrote:
> On 01/05/2020 00:39, Laurent Pinchart wrote:
> > gcc 7.1 introduced processor-specific ABI breakages related to parameter
> > passing on ARM platforms. This generates a large number of messages
> > during compilation witg gcc >=7.1 until gcc 9. Silence them.
> 
> s/witg/with/
> 
> I do dislike having to silence warnings - but in this instance I think
> this is the right thing to do for now. And it's as restricted as it can
> be ... so (with minor typos fixed)...
> 
> Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
> 
> As this is ABI breakage - are any of the warnings attributed to our
> public API usage?
> 
> At this stage, I don't 'care right now' because we have not gone ABI
> stable - but we might need to worry about this later perhaps ...

The messages warn that a version of the library compiled with gcc < 7.1
will not be compatible with a version of the library compiled with gcc
>= 7.1. I don't think we need to cover, I don't expect we'll guarantee
ABI stability across compiler versions. The reason why I didn't silence
the messages for gcc >= 9 is to get informed of future ABI changes, just
in case it could be of interest.

> > Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> > ---
> >  meson.build | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> > 
> > diff --git a/meson.build b/meson.build
> > index 9fc5cc52dc99..718214730da8 100644
> > --- a/meson.build
> > +++ b/meson.build
> > @@ -69,6 +69,16 @@ if cc.has_argument('-Wno-c99-designator')
> >      ]
> >  endif
> >  
> > +# gcc 7.1 introduced processor-specific ABI breakages related to parameter
> > +# passing on ARM platforms. This generates a large number of messages during
> > +# compilation witg gcc >=7.1 until gcc 9. Silence them.
> 
> s/witg/with/
> 
> > +if (host_machine.cpu_family() == 'arm' and cc.get_id() == 'gcc' and
> > +    cc.version().version_compare('>=7.1') and cc.version().version_compare('<9'))
> > +    cpp_arguments += [
> > +        '-Wno-psabi',
> > +    ]
> > +endif
> > +
> >  c_arguments += common_arguments
> >  cpp_arguments += common_arguments
> >  

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list