Re: [PATCH] build: clean up $CFLAGS handling in the makefile

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

 



On Thu, Nov 9, 2017 at 11:18 PM, Christopher Li <sparse@xxxxxxxxxxx> wrote:
> On Fri, Nov 10, 2017 at 5:26 AM, Luc Van Oostenryck
> <luc.vanoostenryck@xxxxxxxxx> wrote:
>>> The selfcheck on sparse-llvm.sc is independent of the CFLAGS changes.
>>
>> On the contrary, it's very much at the core of the way the
>> different CFLAGS variable are used.
>
> I mean the bug is triggerable even before the CFLAGS patch applied.
>
>>
>> Everywhere you will use something like:
>>    <sometarget>.o: <some CFLAGS variant> += <something>
>> you will also need to add <sometarget>.sc
>> It's the way you solve the problem and it may seems to you
>> independent of the CFLAGS changes and yet in my version of
>> the CFLAGS changes this bug was solved automatically by how
>> the CFLAGS were used (I discovered the bug while writting the
>> patch; you know this "ohoh, this can't possibly be correct").
>
> I see. You avoid using target specific variables. That might be
> a good idea. I was looking for the smallest fix to so that
> don't impact too much on the other Makefile changes.
>
> I don't like to have CFLAGS += for every thing though.
> It only works if the options always append from the tail.
> If it is order sensitive, need to insert in the middle, then
> you will need to have sub variable to group from any way,
> like your CPPFLAGS.

In the big makefile cleanup series, I've done slightly
differently but yes, no more target specific vars,
only <target>_CFLAGS and using 'cflags' for
flags private to sparse.
Aesthetically, it's not what I found the most pleasing
but this does well the job (SPARSE_CFLAGS, _CFLAGS,
C_FLAGS,  ... could have been used too).

-- Luc
--
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