Re: [PATCH] Makefile: pass -Wno-vla to sparse while checking pre-process.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 31/07/17 16:51, Christopher Li wrote:
> On Mon, Jul 31, 2017 at 11:29 AM, Ramsay Jones
> <ramsay@xxxxxxxxxxxxxxxxxxxx> wrote:
>>
>>
>>>> Ah, I see what you mean here. You want to distinguish
>>>> CFLAGS for gcc, CHECKER_FLAGS for sparse specific
>>>> flags.
>>>
>>> Err, ... well, yes and no! :-D
>>>
>>> The main idea is to separate the 'additional' flags passed to
>>> sparse for the $(CHECKER) target - not necessarily for sparse
>>> specific flags.
> 
> Yes, my mental model was CHECKER_FLAGS for flags sparse
> to use. I haven't notice the small detail that -Wvla works for gcc
> as well.
> 
>> Hmm, actually the following may be a better patch. what do you
>> think?
> 
> Hmm. When I write the BASIC_CFLAGS, I was thinking to use it for the
> common part of the CFLAGS impact the whole directory or project. Some
> thing as base line, like architecture related stuff etc, nothing fancy.

I thought of it more as a non-override-able list of cflags, which
are required for 'correct'/'desired' behaviour. The CFLAGS are
supposed to be user settable from the command line. So, for example,
if you wanted to compile c2xml and override the CFLAGS, then you must
know to add the output of '$(PKG_CONFIG) --cflags libxml-2.0' manually.

> Each C file might have specific different requirement, like include path etc,
> Those goes to CFLAGS. The stuff get overwrite more often should have
> a slightly shorter name for readability.

Hmm, but see above!

> At least that was my mental model. Either one of the three we discuss here
> is acceptable. If you have to ask me to pick, my order goes to the simplest
> one line change, then introducing $(CHECKER_CFLAGS), then this one.

I'm OK with any of the three too, but I actually think the last
patch is the best. ;-)

ATB,
Ramsay Jones


--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux