On Wed, Oct 28, 2020 at 11:45 AM <pa...@free.fr> wrote:

> ----- Original Message -----
> > Hi
> >
> > This isn't the perfect place to ask this but someone here may have
> > insight.
> > And getting help with Coverity Scan directly isn't easy. I'm hoping
> > someone
> > here has some insight or can point me to someone who does.
> >
> > We have been using Coverity Scan a long time with RTEMS. It works
> > fine
> > using gcc 7.5.0 but Coverity appears to have a problem with gcc 10.
> > This is
> > what --version reports for both toolchains:
> >
> > $ ~/rtems-work/tools/5/bin/sparc-rtems5-gcc --version
> > sparc-rtems5-gcc (GCC) 7.5.0 20191114 (RTEMS 5, RSB 5 (cbae90a5817a),
> > Newlib 7947581)
> >
> > $ sparc-rtems6-gcc --version
> > sparc-rtems6-gcc (GCC) 10.2.1 20201028 (RTEMS 6, RSB
> > 4c5af1f7c1553e53739ca4e9892de26924ec2b3f, Newlib fcaaf40)
>
> Hi
>
> Putting aside politics (I used to work for Synopsys and now work
> for a competitor, but not at all in the domain of static
> analysis), I'll take a stab.
>

:)

Thanks for the quick reply Paul.

>
> When you switched compilers, did you re-run cov-configure?
>

Yes. The script I use runs it every time.

cov-configure -co sparc-rtems6-gcc -- -mcpu=leon3

I decided to try a Coverity run with gcc 10, 9, 8, and 7. We use
gcc 7 on the release branch where Coverity works. This took a
bit of time as I had to build toolchains for each of those versions.

Without changing my script that runs Coverity and removing and
reinstalling Coverity between runs, it works with gcc 7, 8, and 9,
but not 10. If I don't uninstall and reinstall Coverity when changing
GCC versions, it tends to fail. I assume there is some file left over
with GCC version info that it reuses incorrectly.

With gcc 10, Coverity reports this:

  Command-line error #1359: invalid GNU version number: 201

  [ERROR] 1 catastrophic error detected in this compilation.
  Compilation terminated.
  WARNING: cov-emit returned with code 2

We are in the process of switching from an autoconf based build system
to waf so I went ahead and tried the even newer waf build system. I only
checked the waf build system with gcc 8 but it worked.

That leads me to the conclusion that Coverity Scan is broken for GCC
versions with two digit major numbers. Since the binary Coverity provides
is from 2019 and GCC 10 was released in May 2020, it looks likely they
didn't test against a GCC snapshot. Not sure how to make sure that
information gets to the right persons to address it though. If anyone
has a contact other than posting on stackoverflow, please pass it along.

If anyone has any other insight, I'm happy to experiment but I think
this is a Coverity issue which will eventually impact all GCC users as
GCC 10 is adopted more broadly in distributions.

Thanks.

--joel

>
> A+
> Paul
>

Reply via email to