From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by dpdk.org (Postfix) with ESMTP id 29DDC2BB1 for ; Fri, 10 Jun 2016 15:19:20 +0200 (CEST) Received: by mail-wm0-f47.google.com with SMTP id n184so266588825wmn.1 for ; Fri, 10 Jun 2016 06:19:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=VBKGLC+G6cTpRKuHkrDBHIsGHYjz26zIJK1IQa8yW10=; b=cWIkBmahDfrWknvFWYyVZNrVPiPYxiXi9qG/LSf0MOpc4iAIOljKePe+/2NF2RTNEb 9LKUzK/WhFQWoLiZoSkwRQY24nnB4lIAmyUupD8KvZwB6jSf1HjlhFwMQiX/NbTu4NvE GJcKCrKHMScbU8dnaesDoBJkXv/mV/xGsjViN6MYzW/Ply64udyhPRk5ZrUJQQRxYMHP 7TzRzSEDXAKRKV66CPLy9Webk3HO12nydIkQUZHyElr5v0fwJNhDsOKn6Pb2ltXw9YVg pQ1dg/3niLUYB+fGtePKG+JGjJxbAAitFvXIawrpZprQqXwFEzqjn6VqmSVPlz8QbhxY sH1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=VBKGLC+G6cTpRKuHkrDBHIsGHYjz26zIJK1IQa8yW10=; b=lEp+O8f/0B/VUuFsME1OD9nDFFNCuv00VfNJbkjJokRYGQwBZA9V3CY39799T5rR3C oljCYdW4ODVj5Ha2voJ+MJf6zqoajeawOTYpQLWsCfrOeOz0+WGfvKbQqiLvq3YmCUgf BQEMzZ5nSHf1nx2wjYhvthxHT/Lg0iKveLPDb/vJVixR07Sdl3OM0Vtf4EMyXojISrFd dLC18WUx3TRNnw7EOYI3tC5nSvE6pZ1YRLCpsRK+Kl2ceUwVblyHyUM55fAgGM1OIGnj qmxLt3sdsJ93eRquDUV+1YafdZWQSY2WSY7rW13rI6Ktc5GGCkCweGI9BaJ3GnWdUBQt /tvw== X-Gm-Message-State: ALyK8tKq3esA3XRtFULoM9IqRm3M21ROCQ5nYqitCYXvypZfMCnfv9JadLQce8wFszYZkfQ0 X-Received: by 10.28.152.130 with SMTP id a124mr18614121wme.98.1465564759818; Fri, 10 Jun 2016 06:19:19 -0700 (PDT) Received: from XPS13.localdomain (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id o4sm12302758wjx.45.2016.06.10.06.19.18 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 10 Jun 2016 06:19:19 -0700 (PDT) From: Thomas Monjalon To: Ferruh Yigit Cc: dev@dpdk.org Date: Fri, 10 Jun 2016 15:19:05 +0200 Message-Id: <1465564749-1405-3-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1465564749-1405-1-git-send-email-thomas.monjalon@6wind.com> References: <1464367686-3475-1-git-send-email-ferruh.yigit@intel.com> <1465564749-1405-1-git-send-email-thomas.monjalon@6wind.com> Subject: [dpdk-dev] [PATCH v2 2/6] mk: fix driver dependencies order for static application X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jun 2016 13:19:20 -0000 On a linker command line, the dependencies must be declared after the libraries using them. It will avoid some issues when building an application with static libraries and --as-needed option. Signed-off-by: Thomas Monjalon --- mk/rte.app.mk | 38 +++++++++++--------------------------- 1 file changed, 11 insertions(+), 27 deletions(-) diff --git a/mk/rte.app.mk b/mk/rte.app.mk index 07be17c..8068e66 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -93,22 +93,6 @@ ifeq ($(CONFIG_RTE_LIBRTE_VHOST_USER),n) _LDLIBS-$(CONFIG_RTE_LIBRTE_VHOST) += -lfuse endif _LDLIBS-$(CONFIG_RTE_PORT_PCAP) += -lpcap -_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += -lpcap -_LDLIBS-$(CONFIG_RTE_LIBRTE_BNX2X_PMD) += -lz -_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += -libverbs -_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += -libverbs -_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_SZEDATA2) += -lsze2 -_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += -lxenstore -_LDLIBS-$(CONFIG_RTE_LIBRTE_MPIPE_PMD) += -lgxio -_LDLIBS-$(CONFIG_RTE_LIBRTE_NFP_PMD) += -lm -_LDLIBS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += -lz -# QAT / AESNI GCM PMDs are dependent on libcrypto (from openssl) -# for calculating HMAC precomputes -ifeq ($(CONFIG_RTE_LIBRTE_PMD_QAT),y) -_LDLIBS-y += -lcrypto -else ifeq ($(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM),y) -_LDLIBS-y += -lcrypto -endif endif # !CONFIG_RTE_BUILD_SHARED_LIBS _LDLIBS-y += --start-group @@ -124,13 +108,13 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_EAL) += -lrte_eal _LDLIBS-$(CONFIG_RTE_LIBRTE_CMDLINE) += -lrte_cmdline _LDLIBS-$(CONFIG_RTE_LIBRTE_CFGFILE) += -lrte_cfgfile _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_BOND) += -lrte_pmd_bond -_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += -lrte_pmd_xenvirt +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += -lrte_pmd_xenvirt -lxenstore ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),n) # plugins (link only if static libraries) _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += -lrte_pmd_af_packet -_LDLIBS-$(CONFIG_RTE_LIBRTE_BNX2X_PMD) += -lrte_pmd_bnx2x +_LDLIBS-$(CONFIG_RTE_LIBRTE_BNX2X_PMD) += -lrte_pmd_bnx2x -lz _LDLIBS-$(CONFIG_RTE_LIBRTE_CXGBE_PMD) += -lrte_pmd_cxgbe _LDLIBS-$(CONFIG_RTE_LIBRTE_E1000_PMD) += -lrte_pmd_e1000 _LDLIBS-$(CONFIG_RTE_LIBRTE_ENA_PMD) += -lrte_pmd_ena @@ -138,15 +122,15 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += -lrte_pmd_enic _LDLIBS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += -lrte_pmd_fm10k _LDLIBS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += -lrte_pmd_i40e _LDLIBS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += -lrte_pmd_ixgbe -_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += -lrte_pmd_mlx4 -_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += -lrte_pmd_mlx5 -_LDLIBS-$(CONFIG_RTE_LIBRTE_MPIPE_PMD) += -lrte_pmd_mpipe -_LDLIBS-$(CONFIG_RTE_LIBRTE_NFP_PMD) += -lrte_pmd_nfp +_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += -lrte_pmd_mlx4 -libverbs +_LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD) += -lrte_pmd_mlx5 -libverbs +_LDLIBS-$(CONFIG_RTE_LIBRTE_MPIPE_PMD) += -lrte_pmd_mpipe -lgxio +_LDLIBS-$(CONFIG_RTE_LIBRTE_NFP_PMD) += -lrte_pmd_nfp -lm _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += -lrte_pmd_null -_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += -lrte_pmd_pcap -_LDLIBS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += -lrte_pmd_qede +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += -lrte_pmd_pcap -lpcap +_LDLIBS-$(CONFIG_RTE_LIBRTE_QEDE_PMD) += -lrte_pmd_qede -lz _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_RING) += -lrte_pmd_ring -_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_SZEDATA2) += -lrte_pmd_szedata2 +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_SZEDATA2) += -lrte_pmd_szedata2 -lsze2 _LDLIBS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += -lrte_pmd_virtio ifeq ($(CONFIG_RTE_LIBRTE_VHOST),y) _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_VHOST) += -lrte_pmd_vhost @@ -156,10 +140,10 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD) += -lrte_pmd_vmxnet3_uio ifeq ($(CONFIG_RTE_LIBRTE_CRYPTODEV),y) _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += -lrte_pmd_aesni_mb _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_MB) += -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB -_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM) += -lrte_pmd_aesni_gcm +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM) += -lrte_pmd_aesni_gcm -lcrypto _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_AESNI_GCM) += -L$(AESNI_MULTI_BUFFER_LIB_PATH) -lIPSec_MB _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO) += -lrte_pmd_null_crypto -_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += -lrte_pmd_qat +_LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_QAT) += -lrte_pmd_qat -lcrypto _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_SNOW3G) += -lrte_pmd_snow3g _LDLIBS-$(CONFIG_RTE_LIBRTE_PMD_SNOW3G) += -L$(LIBSSO_PATH)/build -lsso endif # CONFIG_RTE_LIBRTE_CRYPTODEV -- 2.7.0