[dpdk-dev] [PATCH v2 1/4] mk: Remove combined library and related options

Neil Horman nhorman at tuxdriver.com
Fri Mar 13 17:32:04 CET 2015


On Fri, Mar 13, 2015 at 09:07:59AM -0700, Stephen Hemminger wrote:
> On Thu, 12 Mar 2015 16:27:58 +0000
> Sergio Gonzalez Monroy <sergio.gonzalez.monroy at intel.com> wrote:
> 
> > Remove CONFIG_RTE_BUILD_COMBINE_LIBS and CONFIG_RTE_LIBNAME.
> > 
> > Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy at intel.com>
> > ---
> 
> NAK. The combined library is good and useful for those who want simplicity
> and build with static library.
> 
No one is removing the ability to link against a single library, its simple to
do by hand.  The only thing this does is the codification of doing so as part of
the DPDK link process.

> It is not clear what you are trying to solve.
> 
In my mind, the problem is that using combined libs breaks the versioning
infrastrucure.  Because .o files can only be linked into .so files once, the
combined lib in the dpdk tree links all .o files at the same time.  But because
version maps are specified per individual library, and we can only specify one
at link time, we are left with a decision as to how to bring both together:

1) We can write a script to merge all the versioning files into one, and apply
that to the master link

2) Drop the combined libraries all together, and use a linker script to simulate
the merging of the libraries

Option two seems a bit rickety, and prone to failure, whereas option two seems
both easy and clean (at least in my view).  Just create a file libdpdk.so, that
is actually a text file with the contents:
INPUT(-lrte_malloc -lrte_mempool ....etc)

That will allow you to link applications to a single library -ldpdk, and things
will just work.  The only additional requriement that puts on your head is that
the individual libraries need to be installed locally on the target system, but
thats a run time requirement, not build time, and is easily managed with
whatever run time software management tools you care to use

Neil
 


More information about the dev mailing list