[dpdk-dev] [PATCH] mk: fix external shared library dependencies of libraries

Panu Matilainen pmatilai at redhat.com
Tue Dec 8 12:19:30 CET 2015


On 12/08/2015 12:11 PM, Thomas Monjalon wrote:
> Hi Panu,
>
> 2015-12-08 10:30, Panu Matilainen:
>> --- a/lib/librte_vhost/Makefile
>> +++ b/lib/librte_vhost/Makefile
>> @@ -44,10 +44,12 @@ CFLAGS += -I vhost_user
>>   else
>>   CFLAGS += -I vhost_cuse -lfuse
>>   LDFLAGS += -lfuse
>> +LDLIBS += -lfuse
>>   endif
>>
>>   ifeq ($(CONFIG_RTE_LIBRTE_VHOST_NUMA),y)
>>   LDFLAGS += -lnuma
>> +LDLIBS += -lnuma
>>   endif
>
> It looks weird to have to declare the dependencies both in
> LDFLAGS and LDLIBS. What is the reason?
> Can we improve it?

I'd say its just an artifact of the dpdk build system evolution and 
surely we can improve it, but I'd leave it post 2.2 to avoid breaking 
anything now.

I'm planning further work in this area and one of the things on my TODO 
list is to look into the LDFLAGS/LDLIBS duplication. Technically, LDLIBS 
should only contain the libraries to link, and all the others directives 
(such as linker path etc) should go to LDFLAGS.

	- Panu -




More information about the dev mailing list