Bug#906472: How should sparse depend on gcc?

2018-10-08 Thread Uwe Kleine-König
Hello,

On 09/21/2018 04:33 PM, Uwe Kleine-König wrote:
> sparse is a C code checker that reuses include files from gcc. Currently
> there are missing the needed dependencies
> (https://bugs.debian.org/906472).
> 
> Now I wonder, what is the right way to depend on gcc. For sparse it
> would be enough to depend on libgcc-8-dev (I think), but as cgcc (which
> is included in the sparse package) calls gcc, too, I need a dependency
> on the gcc package directly (which via gcc-8 depends on libgcc-8-dev).
> 
> As gcc-7 doesn't provide the needed paths, gcc 4:7.whatever isn't enough
> though.
> 
> I can imagine the following options to depend on:
> 
>   a) gcc, libgcc-8-dev
>   b) gcc (>= 4:8~), gcc (<< 4:9)
> 
> . Both have the disadvantage that they need manual adaption when gcc
> bumps it's major version.
> 
> a) also has the disadvantage that gcc might provide gcc-9 and so sparse
> uses different includes than the default compiler (not sure this is bad
> enough to care).
> 
> b) is bad, because gcc_4:9~prerelease12 would be good enough to make
> dpkg happy, but sparse would fail anyhow.
> 
> Alternatively sparse could stop hardcoding the include path and ask gcc
> on each invokation. But I don't like that much as the path hardly ever
> changes and it adds some overhead to sparse.
> 
> Do you have any thoughts/recommendations?

FTR: I changed cgcc to call gcc-8 (instead of cc) now and added a
dependency on gcc-8 now. This way it should be given that the include
files don't disappear and the called programs are around.

Best regards
Uwe



signature.asc
Description: OpenPGP digital signature


Bug#906472: How should sparse depend on gcc?

2018-09-21 Thread Uwe Kleine-König
Hello,

sparse is a C code checker that reuses include files from gcc. Currently
there are missing the needed dependencies
(https://bugs.debian.org/906472).

Now I wonder, what is the right way to depend on gcc. For sparse it
would be enough to depend on libgcc-8-dev (I think), but as cgcc (which
is included in the sparse package) calls gcc, too, I need a dependency
on the gcc package directly (which via gcc-8 depends on libgcc-8-dev).

As gcc-7 doesn't provide the needed paths, gcc 4:7.whatever isn't enough
though.

I can imagine the following options to depend on:

a) gcc, libgcc-8-dev
b) gcc (>= 4:8~), gcc (<< 4:9)

. Both have the disadvantage that they need manual adaption when gcc
bumps it's major version.

a) also has the disadvantage that gcc might provide gcc-9 and so sparse
uses different includes than the default compiler (not sure this is bad
enough to care).

b) is bad, because gcc_4:9~prerelease12 would be good enough to make
dpkg happy, but sparse would fail anyhow.

Alternatively sparse could stop hardcoding the include path and ask gcc
on each invokation. But I don't like that much as the path hardly ever
changes and it adds some overhead to sparse.

Do you have any thoughts/recommendations?

Best regards
Uwe


signature.asc
Description: PGP signature