> On 3 Jul 2017, at 15:24, Bill Fischofer <bill.fischo...@linaro.org> wrote:
> 
> On Mon, Jul 3, 2017 at 7:04 AM, Dmitry Eremin-Solenikov
> <dmitry.ereminsoleni...@linaro.org> wrote:
>> On 03.07.2017 13:34, Savolainen, Petri (Nokia - FI/Espoo) wrote:
>>>> diff --git a/test/Makefile.inc b/test/Makefile.inc
>>>> index 1ef2a92c..bf31b374 100644
>>>> --- a/test/Makefile.inc
>>>> +++ b/test/Makefile.inc
>>>> @@ -4,7 +4,7 @@ LIB   = $(top_builddir)/lib
>>>> #in the following line, the libs using the symbols should come before
>>>> #the libs containing them! The includer is given a chance to add things
>>>> #before libodp by setting PRE_LDADD before the inclusion.
>>>> -LDADD = $(PRE_LDADD) $(LIB)/libodphelper.la $(LIB)/libodp-linux.la
>>>> +LDADD = $(PRE_LDADD) $(LIB)/libodphelper.la $(LIB)/libodp-linux.la
>>>> $(DPDK_PMDS)
>>> 
>>> Application using ODP should only need to add dependency to ODP and helper 
>>> libs. It's not scalable if (all) applications need to know which (all) libs 
>>> an ODP implementation may use internally.
>> 
>> Applications using shared library don't need to know, what are ODP
>> dependencies. Deps will be pulled in using .so DT_NEEDED. Static linking
>> requires knowledge of all dependencies. Usually this will be handled by
>> pkg-config (See Libs.private) or libtool (which also usually handles
>> such configuration). Unfortunately DPDK PMDs do not fit into libtool
>> scheme because of the way they are linked. Libtool doesn't understand
>> whole -Wl,--whole-archive,... scheme, so it won't include it into
>> dependencies list. Another possibility would be to create source file,
>> which pulls in all PMDs detected by configure and link with just -ldpdk.
> 
> Didn't Matias post some patches a while back to use --whole-archive
> for this purpose? See http://patches.opendataplane.org/patch/8237/

This patch only removed the need to reference to the drivers in source code. 
Instead, the build system automatically links all PMDs with '--whole-archive' 
flag.

-Matias

Reply via email to