From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 485C2A00BE; Wed, 29 Apr 2020 12:49:39 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E22F41D9FD; Wed, 29 Apr 2020 12:49:38 +0200 (CEST) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 5AB351D9FB for ; Wed, 29 Apr 2020 12:49:37 +0200 (CEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id F40E85C02A9; Wed, 29 Apr 2020 06:49:36 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Wed, 29 Apr 2020 06:49:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm1; bh= dDDIneZquHcf1AZpruIMSYCtHaUDfyxfoWNMDmHgvYk=; b=jYl0vZPqZKIkzjxl 93EtcYAS9/xDVv5B0FBVRXQbIvDRH7rLxbxKIxYoVBjkoKpEH0xePjg+CDl9jQZm K6dQawgIjseKlMnMltIbKuY2hLYOOCtUy8Uu01yD3hG1JJZbfE8cCPPehS8aDg0Q sqK0CEZUpXTSLESXn1ZGYbW6yjC3oOcr7kI3pVmqdwKn/6Yhcfx4KbPaTOSi0b0q 5bjMhB31pAy7MFm3IEhWG7HkKmw6uCgEOhW/m+ePqVC3yBGaczKjH8gjnqssYtZc a++pMsNm3oRlIx4X2IoCjf7aD/HLqQmzuy/LMwyvDnuXpkceSF7mOuDuAnnN9Di0 mkzn/Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=dDDIneZquHcf1AZpruIMSYCtHaUDfyxfoWNMDmHgv Yk=; b=hTE0m2UsJgCQWCeb2X+E8Y0yyz5Tl+xw/GtQwylINiaPYQ9hMsKmkUTlj p4aCM0U9zRHZDAUeV1Gib2ZXzWAiu04JrvCct5eDMzt57zVFVS9N2jtSMaO4PEls tw74+n1TTRKF2jHz1+pO9kLaKNrtGLyYCp08EPStpWH9n9mJk6/y22KwbDzjRbQC invqtg0Jp10hBx6bTZdv7EvP7OtUTyWE8PF5+zfr+OqJmkdoLxx0mExjmesBqBOn FU4BX7F9KFWdKtJFN7PH25euHaB2UQBVhxoq3yF+yDC6mEk3RT071oR2A38j4Blm Lu7nX+w5CwbhbNgpoH5zp+6VUtv7Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrieefgdefvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucffoh hmrghinheplhhisggsshgurdhsohdplhhisghmlhighedrshhopdhlihgsiidrshhopdhl ihgsihgsvhgvrhgsshdrshhopdhlihgstghrhihpthhordhsohdpughpughkrdhorhhgne cukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghrufhiiigvpedtnecu rfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id DE5D23065EEA; Wed, 29 Apr 2020 06:49:35 -0400 (EDT) From: Thomas Monjalon To: Bruce Richardson Cc: dev@dpdk.org, bluca@debian.org, david.marchand@redhat.com, ktraynor@redhat.com, bingz@mellanox.com Date: Wed, 29 Apr 2020 12:49:34 +0200 Message-ID: <5259911.3sPnXxR9tc@thomas> In-Reply-To: <20200429104232.GC1907@bricha3-MOBL.ger.corp.intel.com> References: <20200429100831.398-1-bruce.richardson@intel.com> <19853055.mFnZMskM5D@thomas> <20200429104232.GC1907@bricha3-MOBL.ger.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH 1/7] build: always link-whole DPDK static libraries 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 29/04/2020 12:42, Bruce Richardson: > On Wed, Apr 29, 2020 at 12:18:19PM +0200, Thomas Monjalon wrote: > > 29/04/2020 12:08, Bruce Richardson: > > > To ensure all constructors are included in static build, we need to pass > > > the --whole-archive flag when linking, which is used with the > > > "link_whole" meson option. Since we use link_whole for all libs, we no > > > longer need to track the lib as part of the static dependency, just the > > > path to the headers for compiling. > > > > Please could you add the generated command line before/after? > > > > I would like to make sure that the external dependencies are out of > > the whole-archive option. > > > > Thanks > > > Sure, > > the link args for the helloworld example from build.ninja are now (snipping > out some .a's from the middle for brevity): > > LINK_ARGS = -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -Wl,--whole-archive > -Wl,--start-group lib/librte_telemetry.a lib/librte_bpf.a > lib/librte_flow_classify.a lib/librte_pipeline.a lib/librte_table.a > lib/librte_port.a lib/librte_fib.a lib/librte_ipsec.a lib/librte_vhost.a > lib/librte_stack.a lib/librte_security.a lib/librte_sched.a > lib/librte_reorder.a lib/librte_rib.a lib/librte_rawdev.a > lib/librte_pdump.a lib/librte_power.a lib/librte_member.a lib/librte_lpm.a > lib/librte_latencystats.a lib/librte_kni.a lib/librte_jobstats.a > lib/librte_ip_frag.a lib/librte_gso.a lib/librte_gro.a > > drivers/librte_pmd_mlx5_vdpa.a drivers/librte_pmd_bbdev_null.a > drivers/librte_pmd_bbdev_turbo_sw.a drivers/librte_pmd_bbdev_fpga_lte_fec.a > drivers/librte_pmd_bbdev_fpga_5gnr_fec.a -Wl,--no-whole-archive > -Wl,--no-as-needed -pthread -lm -ldl -lnuma -lpcap > /usr/lib/x86_64-linux-gnu/libbsd.so /usr/lib/x86_64-linux-gnu/libjansson.so > /usr/lib/x86_64-linux-gnu/libelf.so -lpcap -lpcap -lpcap -lpcap > /usr/lib/x86_64-linux-gnu/libmlx5.so > /usr/lib/x86_64-linux-gnu/libibverbs.so /usr/lib/x86_64-linux-gnu/libz.so > /usr/lib/x86_64-linux-gnu/libmlx4.so -lpcap -lpcap -Wl,--end-group > > The before case is below (again snipping some drivers): > > LINK_ARGS = -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -Wl,--whole-archive > -Wl,--start-group drivers/librte_common_cpt.a drivers/librte_common_dpaax.a > drivers/librte_common_iavf.a drivers/librte_common_mlx5.a > drivers/librte_common_octeontx.a drivers/librte_common_octeontx2.a > drivers/librte_bus_dpaa.a drivers/librte_bus_fslmc.a > drivers/librte_bus_ifpga.a drivers/librte_bus_pci.a > > drivers/librte_pmd_octeontx_event.a drivers/librte_pmd_bbdev_null.a > drivers/librte_pmd_bbdev_turbo_sw.a drivers/librte_pmd_bbdev_fpga_lte_fec.a > drivers/librte_pmd_bbdev_fpga_5gnr_fec.a -Wl,--no-whole-archive > -Wl,--no-as-needed -pthread -lm -ldl -lnuma lib/librte_eal.a > lib/librte_kvargs.a lib/librte_mempool.a lib/librte_ring.a lib/librte_net.a > lib/librte_mbuf.a lib/librte_ethdev.a lib/librte_meter.a > lib/librte_cmdline.a lib/librte_pci.a lib/librte_cryptodev.a > lib/librte_hash.a lib/librte_eventdev.a lib/librte_timer.a > lib/librte_rawdev.a lib/librte_stack.a lib/librte_sched.a > lib/librte_ip_frag.a lib/librte_security.a lib/librte_kni.a > lib/librte_pipeline.a lib/librte_port.a lib/librte_table.a lib/librte_lpm.a > lib/librte_acl.a lib/librte_gso.a lib/librte_vhost.a lib/librte_reorder.a > lib/librte_compressdev.a lib/librte_bbdev.a -lpcap > /usr/lib/x86_64-linux-gnu/libbsd.so /usr/lib/x86_64-linux-gnu/libmlx5.so > /usr/lib/x86_64-linux-gnu/libibverbs.so /usr/lib/x86_64-linux-gnu/libz.so > /usr/lib/x86_64-linux-gnu/libmlx4.so -lpcap -lpcap -lpcap -lpcap -lpcap > -lIPSec_MB -lIPSec_MB /usr/lib/x86_64-linux-gnu/libcrypto.so > /usr/lib/x86_64-linux-gnu/libisal.so -Wl,--end-group > '-Wl,-rpath,$$ORIGIN/../lib' -Wl,-rpath-link,/home/bruce/dpdk.org/build/lib > > These both come from builds with meson 0.54. I can also check that things > look the same for 0.47 too. That's fine, it looks good. Please mention that you move DPDK libs inside but external dependencies are still outside of whole-archive block. Thanks