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 2BA55A00BE; Wed, 29 Apr 2020 12:42:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 50BF91D9C4; Wed, 29 Apr 2020 12:42:41 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 98E0E1D9B1 for ; Wed, 29 Apr 2020 12:42:39 +0200 (CEST) IronPort-SDR: ZZrA+38038FD3F3YJhmVN84w+0aZ4AQM1ly1y1fw+6GJstTXTaQ5fdA0m0ADE2PEtWnAU//fDZ WfSMhI84et5Q== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2020 03:42:38 -0700 IronPort-SDR: Sv0IfdVzQZV3ytnszwttjWFp6RVEk8k8EonhymUbjKFI/sCY8+Ta9WhmCvXfnI3u9fwyhrTg46 txZIQW9hyI9A== X-IronPort-AV: E=Sophos;i="5.73,331,1583222400"; d="scan'208";a="432515720" Received: from bricha3-mobl.ger.corp.intel.com ([10.249.47.131]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 29 Apr 2020 03:42:36 -0700 Date: Wed, 29 Apr 2020 11:42:32 +0100 From: Bruce Richardson To: Thomas Monjalon Cc: dev@dpdk.org, bluca@debian.org, david.marchand@redhat.com, ktraynor@redhat.com, bingz@mellanox.com Message-ID: <20200429104232.GC1907@bricha3-MOBL.ger.corp.intel.com> References: <20200429100831.398-1-bruce.richardson@intel.com> <20200429100831.398-2-bruce.richardson@intel.com> <19853055.mFnZMskM5D@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <19853055.mFnZMskM5D@thomas> 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" 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. /Bruce