From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 46B50271 for ; Fri, 15 Dec 2017 13:02:20 +0100 (CET) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Dec 2017 04:02:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,404,1508828400"; d="scan'208";a="12079919" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.221.106]) by FMSMGA003.fm.intel.com with SMTP; 15 Dec 2017 04:02:16 -0800 Received: by (sSMTP sendmail emulation); Fri, 15 Dec 2017 12:02:16 +0000 Date: Fri, 15 Dec 2017 12:02:15 +0000 From: Bruce Richardson To: Luca Boccassi Cc: dev@dpdk.org, aconole@redhat.com Message-ID: <20171215120215.GA6668@bricha3-MOBL3.ger.corp.intel.com> References: <20171212165940.272969-1-bruce.richardson@intel.com> <1513167062.15861.27.camel@debian.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1513167062.15861.27.camel@debian.org> Organization: Intel Research and Development Ireland Ltd. User-Agent: Mutt/1.9.1 (2017-09-22) Subject: Re: [dpdk-dev] [PATCH 0/6] next-build: create both static and shared libs X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Dec 2017 12:02:20 -0000 On Wed, Dec 13, 2017 at 12:11:02PM +0000, Luca Boccassi wrote: > On Tue, 2017-12-12 at 16:59 +0000, Bruce Richardson wrote: > > This patchset changes the meson+ninja build system to always create > > both > > static and shared libraries when doing a build. The applications > > compiled > > as part of a build use either the shared or static libraries > > depending on > > what the default_library build setting is. > > > > NOTE: > > The main difficulty with this change is adjusting the pkgconfig file > > so > > that external apps, like the examples, can be built using either the > > static > > or shared libraries. One of the key issues was the fact that running > > "pkg-config --static --libs libdpdk" outputs first the normal libs, > > and > > then the extra static ones. This is a problem because the driver libs > > are > > for static only builds, but need to come before, not after the > > standard > > DDPK libraries.  It also procludes adding in the -Wl,-Bstatic flag > > into the output for the standard libraries to link them statically. > > > > There were two options considered for mananging the pkg-config > > settings. > > 1. Creating a separate .pc file for static builds with exactly the > > flags > > needed. > > 2. Modifying the single .pc file so that it was "good enough" to > > enable > > static builds without too much work. > > > > For this version of this set, I took option #2. To link using dynamic > > libs, > > all is as normal, to use static libs, the user needs to prepend > > "-Wl,-Bstatic" before the "pkgconfig --static" library output. This > > can be > > seen in the changes to the example application makefiles, which now > > support > > building the examples using shared or static DPDK libs. > > > > Bruce Richardson (6): > >   build: remove library special cases > >   eal: fix list of source files to meson build > >   build: build all libs and drivers as both static and shared > >   build: change default library type to static > >   build: symlink drivers to library directory > >   examples: enable linking examples both static and shared > > > >  app/test-pmd/meson.build                       |   5 +- > >  buildtools/symlink-drivers-solibs.sh           |  16 ++++ > >  config/meson.build                             |  14 ++++ > >  doc/guides/contributing/coding_style.rst       |   9 +++ > >  drivers/meson.build                            |  43 +++++++--- > >  drivers/net/e1000/base/meson.build             |   2 +- > >  drivers/net/fm10k/base/meson.build             |   2 +- > >  drivers/net/i40e/base/meson.build              |   2 +- > >  drivers/net/ixgbe/base/meson.build             |   2 +- > >  examples/bond/Makefile                         |  21 +++-- > >  examples/cmdline/Makefile                      |  21 +++-- > >  examples/distributor/Makefile                  |  21 +++-- > >  examples/eventdev_pipeline_sw_pmd/Makefile     |  21 +++-- > >  examples/exception_path/Makefile               |  21 +++-- > >  examples/flow_classify/Makefile                |  21 +++-- > >  examples/flow_filtering/Makefile               |  21 +++-- > >  examples/helloworld/Makefile                   |  21 +++-- > >  examples/ip_fragmentation/Makefile             |  21 +++-- > >  examples/ip_pipeline/Makefile                  |  21 +++-- > >  examples/ip_reassembly/Makefile                |  21 +++-- > >  examples/ipsec-secgw/Makefile                  |  21 +++-- > >  examples/ipv4_multicast/Makefile               |  21 +++-- > >  examples/kni/Makefile                          |  21 +++-- > >  examples/l2fwd-cat/Makefile                    |  21 +++-- > >  examples/l2fwd-crypto/Makefile                 |  21 +++-- > >  examples/l2fwd-jobstats/Makefile               |  21 +++-- > >  examples/l2fwd-keepalive/Makefile              |  21 +++-- > >  examples/l2fwd/Makefile                        |  21 +++-- > >  examples/l3fwd-acl/Makefile                    |  21 +++-- > >  examples/l3fwd-power/Makefile                  |  21 +++-- > >  examples/l3fwd-vf/Makefile                     |  21 +++-- > >  examples/l3fwd/Makefile                        |  21 +++-- > >  examples/link_status_interrupt/Makefile        |  21 +++-- > >  examples/load_balancer/Makefile                |  21 +++-- > >  examples/meson.build                           |   2 +- > >  examples/packet_ordering/Makefile              |  21 +++-- > >  examples/ptpclient/Makefile                    |  21 +++-- > >  examples/qos_meter/Makefile                    |  21 +++-- > >  examples/qos_sched/Makefile                    |  21 +++-- > >  examples/rxtx_callbacks/Makefile               |  21 +++-- > >  examples/service_cores/Makefile                |  21 +++-- > >  examples/skeleton/Makefile                     |  21 +++-- > >  examples/tep_termination/Makefile              |  21 +++-- > >  examples/timer/Makefile                        |  21 +++-- > >  examples/vhost/Makefile                        |  21 +++-- > >  examples/vhost_scsi/Makefile                   |  21 +++-- > >  examples/vmdq/Makefile                         |  21 +++-- > >  examples/vmdq_dcb/Makefile                     |  21 +++-- > >  lib/librte_eal/bsdapp/eal/meson.build          |  34 +------- > >  lib/librte_eal/bsdapp/meson.build              |  55 ------------- > >  lib/librte_eal/common/arch/meson.build         |  33 -------- > >  lib/librte_eal/common/include/arch/meson.build |  33 -------- > >  lib/librte_eal/common/include/meson.build      |  71 ------------- > > --- > >  lib/librte_eal/common/meson.build              |  74 ++++++++++++++- > > -- > >  lib/librte_eal/linuxapp/eal/meson.build        |  36 +-------- > >  lib/librte_eal/linuxapp/igb_uio/meson.build    |   8 +- > >  lib/librte_eal/linuxapp/meson.build            |  42 ---------- > >  lib/librte_eal/meson.build                     |  45 +++++++++-- > >  lib/meson.build                                | 107 > > ++++++++++++++++--------- > >  meson.build                                    |  31 ++++--- > >  60 files changed, 885 insertions(+), 579 deletions(-) > >  create mode 100644 buildtools/symlink-drivers-solibs.sh > >  delete mode 100644 lib/librte_eal/bsdapp/meson.build > >  delete mode 100644 lib/librte_eal/common/arch/meson.build > >  delete mode 100644 lib/librte_eal/common/include/arch/meson.build > >  delete mode 100644 lib/librte_eal/common/include/meson.build > >  delete mode 100644 lib/librte_eal/linuxapp/meson.build > > > > Acked-by: Luca Boccassi > Pushed to dpdk-next-build. [One change made from submitted patches in that the new file was added with a traditional license header, rather than SPDX tag, given that the format of the tags is not fully locked-down. Once that's settled, the new file can be updated along with all the other meson build system ones.] /Bruce