[dpdk-dev] [PATCH v8 1/2] mk:Simplify the ifdefs in rte.app.mk

Wiles, Keith keith.wiles at intel.com
Wed May 13 16:34:45 CEST 2015



On 5/13/15, 9:28 AM, "Olivier MATZ" <olivier.matz at 6wind.com> wrote:

>
>On 05/13/2015 04:04 PM, Wiles, Keith wrote:
>>
>>
>> On 5/13/15, 8:56 AM, "Olivier MATZ" <olivier.matz at 6wind.com> wrote:
>>
>>> Hi Keith,
>>>
>>> On 05/13/2015 03:17 PM, Wiles, Keith wrote:
>>>>>>
>>>>>>     endif # ifeq ($(NO_AUTOLIBS),)
>>>>>>
>>>>>> -LDLIBS += $(CPU_LDLIBS)
>>>>>> +LDLIBS += $(_LDLIBS-y) $(EXTRA_LDLIBS)
>>>>>>
>>>>>
>>>>> As discussed in the previous mail, all things that are about
>>>>> EXTRA_LDLIBS should be moved in the second patch. Therefore,
>>>>> the title of the second patch should not be "update doc...", but
>>>>> something like "mk: introduce EXTRA_LDLIBS...".
>>>>>
>>>>> By the way, I missed that before, but it seems that your
>>>>> patch removes CPU_LDLIBS, I don't think it's correct.
>>>>
>>>> I found no reference to CPU_LDLIBS in the docs or code other then then
>>>> one
>>>> line. We now have EXTRA_LDLIBS for the command line, right?
>>>
>>> Yes, but your patch says "simplify the ifdef". Removing
>>> a variable (even if it is not used) in this patch is not
>>> a good idea.
>>>
>>> Now, the CPU_CFLAGS, CPU_LDFLAGS, CPU_LDLIBS can be defined internally
>>> by the rte.vars.mk in mk/arch/ or mk/machine/ directories.
>>
>> No docs for CPU_LDLIBS or reference to that variable, which means it
>>does
>> not exist, right?
>> If it was used or documented then I would agree. Having magic variables
>>is
>> not a good idea. I will add the CPU_LDLIBS in to the line, but someone
>> will have to document that variable.
>
>First, this variable is internal to DPDK framework. It is not

Not referenced in the code any place except the one line and not
referenced in the docs, which means no one used that variable. By
definition this is some magic variable that someone could use only because
he knew about that variable.

As I stated before, I will add that variable back, but it must be
documented, correct?

>documented, because the goal of the documentation is not to
>document all internal variables. In one word, it's not a magic
>variable at all, it is simply a variable.
>
>Now, the heart of the matter is that your patch silently remove
>this line. This is not acceptable and that's why I'm commenting
>on it. The goal of patch splitting and proper title is to separate
>features, and win time when searching in the git log for the cause
>of a problem.
>
>This is the same problem with EXTRA_LDLIBS. How can you justify
>having 2 patches:
>- "simplify the ifdef" that also adds the EXTRA_LDLIBS
>  then
>- "update the documentation for EXTRA_LDLIBS"
>
>Regards,
>Olivier
>
>
>
>>>
>>> Regards,
>>> Olivier
>>>
>>
>



More information about the dev mailing list