From: Christophe LEROY <christophe.leroy@c-s.fr>
To: Nick Desaulniers <ndesaulniers@google.com>,
Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Cc: joe@perches.com, Kees Cook <keescook@chromium.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-sparse@vger.kernel.org, sparse@chrisli.org
Subject: Re: Conflict between sparse and commit cafa0010cd51f ("Raise the minimum required gcc version to 4.6")
Date: Mon, 10 Sep 2018 08:49:07 +0200 [thread overview]
Message-ID: <e6db84f1-ee8d-9377-5f1c-6a0e7972ba50@c-s.fr> (raw)
In-Reply-To: <CAKwvOdmXs+pWJGXu-zr-XSu7p-7hw=2m1vVQmVLwJcmGEFz0gg@mail.gmail.com>
Le 07/09/2018 à 20:19, Nick Desaulniers a écrit :
> On Fri, Sep 7, 2018 at 11:13 AM Luc Van Oostenryck
> <luc.vanoostenryck@gmail.com> wrote:
>>
>> On Fri, Sep 07, 2018 at 10:22:56AM -0700, Nick Desaulniers wrote:
>>> On Fri, Sep 7, 2018 at 7:34 AM Christophe LEROY <christophe.leroy@c-s.fr> wrote:
>>>>
>>>> Cc linux-sparse@vger.kernel.org
>>>>
>>>> Le 07/09/2018 à 14:22, Christophe Leroy a écrit :
>>>>> Since commit cafa0010cd51f ("Raise the minimum required gcc version to
>>>>> 4.6"), sparse check fails as follows:
>>>>>
>>>>> [root@pc16082vm linux-powerpc]# make C=2 arch/powerpc/kernel/process.o
>>>>> CALL scripts/checksyscalls.sh
>>>>> CHECK scripts/mod/empty.c
>>>>> ./include/linux/compiler-gcc.h:14:3: error: Sorry, your compiler is too
>>>>> old - please upgrade it.
>>>>> CHECK arch/powerpc/kernel/process.c
>>>>> ./include/linux/compiler-gcc.h:14:3: error: Sorry, your compiler is too
>>>>> old - please upgrade it.
>>>>>
>>>>>
>>>>> I have sparse version 0.5.2
>>>>>
>>>>> What can be done to fix that ?
>>>>>
>>>>> Christophe
>>>
>>> Oof, sorry Christophe. Looks like that's the latest version of sparse:
>>> https://sparse.wiki.kernel.org/index.php/Main_Page#News
>>>
>>> I'm curious what sparse expands __GNUC__, __GNUC_MINOR__, and
>>> __GNUC_PATCHLEVEL__ to? Pre commit cafa0010cd51f, it MUST be
>>> expanding them to something, otherwise you'd have seen the error then,
>>> too. The previous check was GCC < 3.3, now it's GCC < 4.6.
>>
>> Sparse expand these macros to the same version than the compiler used
>> to compile GCC. I find a bit strange though to have sparse v0.5.2 but
>> using an old compiler.
>
> So Christophe must have a version of gcc < 4.6 installed somewhere?
> Does sparse use `cc`? If so, Christophe, does your `ls -l $(which cc)`
> point to an old version of gcc maybe?
Indeed it looks like sparse expand these macros to the version of the
compiler it was compiled with.
I'm building kernels for a powerpc platforms, with CROSS_COMPILE set to
ppc-linux- and ppc-linux-gcc being version 5.4
However my build machine is a CentOS6 and the native gcc has version
4.4.7, so sparse expands that version.
Is there a way to get sparse in line with my cross compiler version and
not with the local native version ?
Christophe
>
>>
>> Also, it's worth to look at what is said in this email:
>> https://lore.kernel.org/lkml/CA+55aFzYEnZR2GZLR-DwpONjMNYGYoDy+6AWLCVNayWiaZuqoA@mail.gmail.com/
>>
>>
>> -- Luc
>
>
>
next prev parent reply other threads:[~2018-09-10 6:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <81a5fd11-366c-0897-4143-d8d041420a41@c-s.fr>
2018-09-07 14:33 ` Conflict between sparse and commit cafa0010cd51f ("Raise the minimum required gcc version to 4.6") Christophe LEROY
2018-09-07 17:22 ` Nick Desaulniers
2018-09-07 18:13 ` Luc Van Oostenryck
2018-09-07 18:19 ` Nick Desaulniers
2018-09-07 18:37 ` Luc Van Oostenryck
2018-09-10 6:49 ` Christophe LEROY [this message]
2018-09-10 9:28 ` Luc Van Oostenryck
2018-09-10 9:56 ` Christophe Leroy
2018-09-10 11:34 ` Luc Van Oostenryck
2018-09-10 13:19 ` Christophe Leroy
2018-09-10 13:56 ` Luc Van Oostenryck
2018-09-10 14:05 ` Christophe LEROY
2018-09-10 15:15 ` Luc Van Oostenryck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e6db84f1-ee8d-9377-5f1c-6a0e7972ba50@c-s.fr \
--to=christophe.leroy@c-s.fr \
--cc=joe@perches.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sparse@vger.kernel.org \
--cc=luc.vanoostenryck@gmail.com \
--cc=ndesaulniers@google.com \
--cc=sparse@chrisli.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox