Re: Conflict between sparse and commit cafa0010cd51f ("Raise the minimum required gcc version to 4.6")

From: Luc Van Oostenryck
Date: Mon Sep 10 2018 - 07:34:56 EST


On Mon, Sep 10, 2018 at 09:56:33AM +0000, Christophe Leroy wrote:
>
> # export REAL_CC=ppc-linux-gcc
> # make CHECK="cgcc -target=ppc -D_CALL_ELF=2 -D__GCC__=5
> -D__GCC_MINOR__=4" C=2 arch/powerpc/kernel/process.o
> scripts/kconfig/conf --syncconfig Kconfig
> #
> # configuration written to .config
> #
> UPD include/config/kernel.release
> UPD include/generated/utsrelease.h
> CC kernel/bounds.s
> CC arch/powerpc/kernel/asm-offsets.s
> CALL scripts/checksyscalls.sh
> CHECK scripts/mod/empty.c
> Can't exec "/bin/sh": Argument list too long at /usr/local/bin/cgcc line 86.
> make[2]: *** [scripts/mod/empty.o] Error 1
> make[1]: *** [scripts/mod] Error 2
> make: *** [scripts] Error 2

OK. Clearly nobody has ever used it so :(
There is an infinite loop because cgcc use the env var CHECK
to call sparse while kbuild use CHECK to call cgcc here.

The following seems to work here.
$ export REAL_CC=ppc-linux-gcc
$ make CHECK="CHECK=sparse cgcc -target=ppc ...

It's a bit kludgy, I admit.

-- Luc